This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd ./project-name | |
flutter devices | |
# Chrome • chrome • web-javascript • Google Chrome 80.0.3987.87 | |
# Web Server • web-server • web-javascript • Flutter Tools | |
flutter run -d chrome | |
# Should startup your web dev server. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
flutter build web --release | |
# Compiling lib/main.dart for the Web… 1.6s |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>> cd ./build/web | |
# The following are the steps that I took, they could vary from project to project. | |
>> git init | |
>> git remote add origin | |
>> git add . | |
>> git commit -m "Init Flutter web project" | |
>> git push |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
LobbyScreen.route: (context) => LobbyScreen(), | |
LoginScreen.route: (context) => LoginScreen(), | |
GameScreen.route: (context) => GameScreen(), | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
return MaterialApp( | |
title: 'Flutter Demo', | |
theme: ThemeData.light(), | |
initialRoute: LoginScreen.route, | |
routes: { | |
LobbyScreen.route: (context) => LobbyScreen(), | |
LoginScreen.route: (context) => LoginScreen(), | |
GameScreen.route: (context) => GameScreen(), | |
}, | |
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Navigator.pushNamed(context, LobbyScreen.route); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package de.myracledesign.fingerprint | |
import io.flutter.embedding.android.FlutterFragmentActivity | |
import io.flutter.embedding.engine.FlutterEngine | |
import io.flutter.plugins.GeneratedPluginRegistrant | |
class MainActivity : FlutterFragmentActivity() { | |
override fun configureFlutterEngine(flutterEngine: FlutterEngine) { | |
GeneratedPluginRegistrant.registerWith(flutterEngine) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
onGenerateRoute: (settings) { | |
switch (settings.name) { | |
case LoginScreen.route: | |
return MaterialPageRoute(builder: (_) => LoginScreen()); | |
break; | |
case LobbyScreen.route: | |
return MaterialPageRoute(builder: (_) => LobbyScreen()); | |
break; | |
case GameScreen.route: | |
return MaterialPageRoute(builder: (_) => GameScreen()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
onPressed: () { | |
Navigator.pushNamed( | |
context, | |
LobbyScreen.route, | |
arguments: {"user-msg": "Thank you for reading!"}, | |
); | |
} |