This file contains 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'; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatelessWidget { | |
const MyApp({Key key}) : super(key: key); | |
@override | |
Widget build(BuildContext context) => MaterialApp( | |
title: 'Flutter Demo', | |
theme: ThemeData( |
This file contains 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'; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) => MaterialApp( | |
title: 'MediaQuery Demo', | |
theme: ThemeData( | |
primarySwatch: Colors.blue, |
This file contains 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'; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) => MaterialApp( | |
title: 'Flutter Demo', | |
theme: ThemeData( | |
primarySwatch: Colors.blue, |
This file contains 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:io' show Platform; | |
import 'package:flutter/material.dart'; | |
import 'package:flutter/cupertino.dart' | |
show | |
CupertinoApp, | |
CupertinoButton, | |
CupertinoColors, | |
CupertinoPageRoute, |
This file contains 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'; | |
class Bloc extends StateSetter { | |
// | |
Bloc([StateBloc state]) : super() { | |
// Associate it with the specified State object. | |
addState(state); | |
// Include it in a collection of Blocs. |
This file contains 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'; | |
void main() => runApp(const MyApp()); | |
class MyApp extends StatelessWidget { | |
const MyApp({Key key}) : super(key: key); | |
@override | |
Widget build(BuildContext context) => MaterialApp( | |
theme: ThemeData( |
This file contains 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' show ThemeData; | |
import 'package:prefs/prefs.dart'; | |
/// The App's theme controller | |
class ThemeController { | |
factory ThemeController() => _this ??= ThemeController._(); | |
ThemeController._() { | |
_isDarkmode = Prefs.getBool('darkmode', false); | |
} |
This file contains 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
// TextFormField & Form Validation. | |
// https://flutter.dev/docs/cookbook/forms/validation | |
class FormValidation extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
final appTitle = 'Form Validation Demo'; | |
return MaterialApp( | |
title: appTitle, | |
home: Scaffold( |
This file contains 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' show Future; | |
import 'dart:math' show Random; | |
import 'dart:typed_data' show Int64List; | |
import 'dart:ui' show Color; | |
import 'package:flutter/cupertino.dart'; | |
import 'package:flutter/material.dart'; | |
// | |
import 'package:flutter_local_notifications/flutter_local_notifications.dart'; |
This file contains 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' show Future; | |
import 'dart:io' show File; | |
import 'dart:typed_data' show Int64List; | |
import 'dart:ui' show Color, FontWeight, Radius, VoidCallback; | |
import 'package:http/http.dart' as http; |