Skip to content

Commit

Permalink
Merge pull request #116 from JordyHers-org/bugfix/115-splash-screen-e…
Browse files Browse the repository at this point in the history
…rror-wrong-parent-child

Bugfix/115 splash screen error wrong parent child
  • Loading branch information
JordyHers authored Jun 12, 2023
2 parents ab019ec + 460aa51 commit e2f5a57
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 45 deletions.
86 changes: 42 additions & 44 deletions lib/app/splash/splash_content.dart
Original file line number Diff line number Diff line change
Expand Up @@ -50,29 +50,30 @@ class _SplashContentState extends State<SplashContent>

@override
Widget build(BuildContext context) {
return SingleChildScrollView(
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
Padding(
padding: const EdgeInsets.symmetric(
horizontal: 10.0,
vertical: 40,
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Center(
child: Icon(
widget.icon,
size: 260,
),
return Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
Padding(
padding: const EdgeInsets.symmetric(
horizontal: 10.0,
vertical: 40,
),
child: Stack(
children: [
Center(
child: Icon(
widget.icon,
size: 260,
),
SizedBox(height: 20),
_SlideText(
slideAnimation: _slideAnimation,
delay: Duration(milliseconds: 200),
),
SizedBox(height: 20),
_SlideText(
slideAnimation: _slideAnimation,
delay: Duration(milliseconds: 200),
child: Container(
padding: EdgeInsets.only(top: 250),
margin: EdgeInsets.symmetric(horizontal: 40),
child: DisplayText(
text: widget.title,
fontSize: 25,
Expand All @@ -82,28 +83,29 @@ class _SplashContentState extends State<SplashContent>
),
),
),
SizedBox(height: 20),
_SlideText(
slideAnimation: _slideAnimation,
delay: Duration(milliseconds: 300),
child: Container(
margin: EdgeInsets.symmetric(horizontal: 40),
child: DisplayText(
text: widget.text,
fontSize: 17,
style: TextStyle(
color: Colors.black.withOpacity(0.5),
fontWeight: FontWeight.w400,
height: 1.2,
),
),
SizedBox(height: 20),
_SlideText(
slideAnimation: _slideAnimation,
delay: Duration(milliseconds: 300),
child: Container(
padding: EdgeInsets.only(top: 300),
margin: EdgeInsets.symmetric(horizontal: 40),
child: DisplayText(
text: widget.text,
fontSize: 17,
style: TextStyle(
color: Colors.black.withOpacity(0.5),
fontWeight: FontWeight.w400,
height: 1.2,
),
),
),
],
),
),
],
),
],
),
),
],
);
}
}
Expand All @@ -125,10 +127,6 @@ class _SlideText extends StatelessWidget {
return AnimatedPositioned(
duration: const Duration(milliseconds: 300),
curve: Curves.easeInOut,
left: 0,
right: 0,
top: 0,
bottom: 0,
child: SlideTransition(
position: slideAnimation!,
child: _DelayedDisplay(
Expand Down
2 changes: 1 addition & 1 deletion lib/app/splash/splash_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class _SplashScreenState extends State<SplashScreen> {
{
'text': 'Send notifications to your child when time '
' limit is reached or when he has to go to bed.',
'title': 'Learn to Control and Monitor',
'title': 'Control and Monitor',
'icon': Icons.lock_reset,
},
{
Expand Down

0 comments on commit e2f5a57

Please sign in to comment.