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
import 'package:app/main.dart'; | |
import 'package:flutter/material.dart'; | |
class HomePage extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) => new Scaffold( | |
appBar: new AppBar( | |
title: new Text('Home'), | |
), | |
body: new Container( |
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
import 'package:app/main.dart'; | |
import 'package:flutter/material.dart'; | |
class LoginPage extends StatefulWidget { | |
@override | |
State<StatefulWidget> createState() => new _LoginPageState(); | |
} | |
class _LoginPageState extends State<LoginPage> { | |
String _status = 'no-action'; |
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
import 'dart:async'; | |
import 'dart:math'; | |
class AuthService { | |
// Login | |
Future<bool> login() async { | |
// Simulate a future for response after 2 second. | |
return await new Future<bool>.delayed( | |
new Duration( | |
seconds: 2 |
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
import 'package:flutter/material.dart'; | |
// Import fluro package. | |
import 'package:fluro/fluro.dart'; | |
// Import my pages. | |
import 'package:app/pages/about.page.dart'; | |
import 'package:app/pages/home.page.dart'; | |
import 'package:app/pages/splash.page.dart'; | |
void main() { |
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
import 'package:flutter/material.dart'; | |
// About page... | |
class AboutPage extends StatefulWidget { | |
@override | |
State<StatefulWidget> createState() { | |
return new _AboutPageState(); | |
} | |
} |
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
import 'package:flutter/material.dart'; | |
// Home page... | |
class HomePage extends StatefulWidget { | |
@override | |
State<StatefulWidget> createState() { | |
return new _HomePageState(); | |
} | |
} |
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
import 'package:flutter/material.dart'; | |
// Splash page... | |
class SplashPage extends StatefulWidget { | |
@override | |
State<StatefulWidget> createState() { | |
return new _SplashPageState(); | |
} | |
} |
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 packages get |
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
dependencies: | |
flutter: | |
sdk: flutter | |
fluro: "^1.2.1" // Add this line for Fluro package |
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 create app |