diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 2ebf6a86..f524ea35 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -13,7 +13,7 @@ additional functionality it is fine to subclass or reimplement FlutterApplication and put your custom class here. --> - - + + + + + + + diff --git a/android/app/src/main/java/co/appbrewery/destinichallengestarting/MainActivity.java b/android/app/src/main/java/co/appbrewery/destinichallengestarting/MainActivity.java index 8e9946c9..8d4e5298 100644 --- a/android/app/src/main/java/co/appbrewery/destinichallengestarting/MainActivity.java +++ b/android/app/src/main/java/co/appbrewery/destinichallengestarting/MainActivity.java @@ -1,13 +1,6 @@ package co.appbrewery.destinichallengestarting; -import android.os.Bundle; -import io.flutter.app.FlutterActivity; -import io.flutter.plugins.GeneratedPluginRegistrant; +import io.flutter.embedding.android.FlutterActivity; public class MainActivity extends FlutterActivity { - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - GeneratedPluginRegistrant.registerWith(this); - } } diff --git a/android/app/src/main/res/values/styles.xml b/android/app/src/main/res/values/styles.xml index 00fa4417..f09400a8 100644 --- a/android/app/src/main/res/values/styles.xml +++ b/android/app/src/main/res/values/styles.xml @@ -5,4 +5,8 @@ Flutter draws its first frame --> @drawable/launch_background + + diff --git a/lib/main.dart b/lib/main.dart index 8b925721..cbfbf455 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -45,18 +45,19 @@ class _StoryPageState extends State { ), Expanded( flex: 2, - child: FlatButton( + child: TextButton( onPressed: () { //Choice 1 made by user. //TODO: Step 18 - Call the nextStory() method from storyBrain and pass the number 1 as the choice made by the user. }, - color: Colors.red, + style: TextButton.styleFrom( + textStyle: const TextStyle(fontSize: 20), + backgroundColor: Colors.red, + foregroundColor: Colors.white, + ), child: Text( //TODO: Step 13 - Use the storyBrain to get the text for choice 1. 'Choice 1', - style: TextStyle( - fontSize: 20.0, - ), ), ), ), @@ -67,18 +68,19 @@ class _StoryPageState extends State { flex: 2, //TODO: Step 26 - Use a Flutter Visibility Widget to wrap this FlatButton. //TODO: Step 28 - Set the "visible" property of the Visibility Widget to equal the output from the buttonShouldBeVisible() method in the storyBrain. - child: FlatButton( + child: TextButton( onPressed: () { //Choice 2 made by user. //TODO: Step 19 - Call the nextStory() method from storyBrain and pass the number 2 as the choice made by the user. }, - color: Colors.blue, + style: TextButton.styleFrom( + textStyle: const TextStyle(fontSize: 20), + backgroundColor: Colors.blue, + foregroundColor: Colors.white, + ), child: Text( //TODO: Step 14 - Use the storyBrain to get the text for choice 2. 'Choice 2', - style: TextStyle( - fontSize: 20.0, - ), ), ), ),