Skip to content

Commit

Permalink
Fixed stack on convincing screen
Browse files Browse the repository at this point in the history
  • Loading branch information
guyluz11 committed Oct 19, 2024
1 parent 7a488fd commit 7f40d09
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 72 deletions.
112 changes: 56 additions & 56 deletions lib/presentation/pages/convincing_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,69 +15,69 @@ class ConvincingPage extends StatelessWidget {
children: [
const TopBarMolecule(topBarType: TopBarType.none, margin: false),
MarginedExpandedAtom(
child: Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const SizedBox(width: double.infinity),
AnimatedTextAtom(
text: 'The app will',
variant: AnimatedTextVariant.flicker,
onDone: () {},
textColorWhite: true,
),
const SeparatorAtom(),
const SeparatorAtom(),
TextAtom(
'* Organize your breaks',
style: Theme.of(context)
.textTheme
.titleLarge!
.copyWith(color: Colors.white),
),
const SeparatorAtom(),
TextAtom(
'* Enrich you with efficiency tips',
style: Theme.of(context)
.textTheme
.titleLarge!
.copyWith(color: Colors.white),
),
const SeparatorAtom(),
TextAtom(
'* Encourage healthy habits',
style: Theme.of(context)
.textTheme
.titleLarge!
.copyWith(color: Colors.white),
),
],
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const SizedBox(width: double.infinity),
AnimatedTextAtom(
text: 'The app will',
variant: AnimatedTextVariant.flicker,
onDone: () {},
textColorWhite: true,
),
const SeparatorAtom(),
const SeparatorAtom(),
TextAtom(
'* Organize your breaks',
style: Theme.of(context)
.textTheme
.titleLarge!
.copyWith(color: Colors.white),
),
const SeparatorAtom(),
TextAtom(
'* Enrich you with efficiency tips',
style: Theme.of(context)
.textTheme
.titleLarge!
.copyWith(color: Colors.white),
),
const SeparatorAtom(),
TextAtom(
'* Encourage healthy habits',
style: Theme.of(context)
.textTheme
.titleLarge!
.copyWith(color: Colors.white),
),
],
),
),
const Expanded(child: Text('')),
SafeArea(
child: AnimatedOpacity(
opacity: 1.0,
duration: const Duration(seconds: 2),
child: ButtonAtom(
variant: ButtonVariant.highEmphasisFilled,
onPressed: () {
PreferencesController.instance
.setBool(PreferenceKeys.finishedIntroduction, true);
AnimatedOpacity(
opacity: 1.0,
duration: const Duration(seconds: 2),
child: ButtonAtom(
variant: ButtonVariant.highEmphasisFilled,
onPressed: () {
PreferencesController.instance
.setBool(PreferenceKeys.finishedIntroduction, true);

Navigator.of(context).pop();
Navigator.of(context).pop();

Navigator.of(context).push(
MaterialPageRoute(
builder: (context) => HomePage(),
),
);
},
text: 'Home Page',
),
Navigator.of(context).push(
MaterialPageRoute(
builder: (context) => HomePage(),
),
);
},
text: 'Home Page',
),
),
const SeparatorAtom(),
const SafeArea(
child: Text(''),
),
],
),
),
Expand Down
34 changes: 18 additions & 16 deletions lib/presentation/pages/welcome_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -64,25 +64,27 @@ class _WelcomePageState extends State<WelcomePage> {
),
const SeparatorAtom(),
const Expanded(child: Text('')),
SafeArea(
child: AnimatedOpacity(
opacity: buttonOpacity,
duration: const Duration(seconds: 2),
child: ButtonAtom(
variant: ButtonVariant.highEmphasisFilled,
onPressed: () {
Navigator.of(context).pop();
AnimatedOpacity(
opacity: buttonOpacity,
duration: const Duration(seconds: 2),
child: ButtonAtom(
variant: ButtonVariant.highEmphasisFilled,
onPressed: () {
Navigator.of(context).pop();

Navigator.of(context).push(
MaterialPageRoute(
builder: (context) => ConvincingPage(),
),
);
},
text: 'Next',
),
Navigator.of(context).push(
MaterialPageRoute(
builder: (context) => ConvincingPage(),
),
);
},
text: 'Next',
),
),
const SeparatorAtom(),
const SafeArea(
child: Text(''),
),
],
),
),
Expand Down

0 comments on commit 7f40d09

Please sign in to comment.