View futurebuilder_mixin.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
/// | |
/// Supply a FutureBuilder to a State object. | |
/// | |
import 'package:flutter/cupertino.dart'; | |
import 'package:flutter/material.dart'; | |
/// Replace 'dart:io' for Web applications | |
import 'package:universal_platform/universal_platform.dart'; |
View inherited_state_mixin.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
/// | |
/// Any State object 'with' this mixin has then a built-in InheritedWidget | |
/// | |
/// | |
import 'package:flutter/material.dart'; | |
/// | |
mixin InheritedStateMixin<T extends StatefulWidget> on State<T> { | |
/// Traditionally called in the initState() function | |
void initInheritedState<U extends InheritedWidget>({ |
View app_counter_inherited.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 '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( |
View mediaQuery.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 '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, |
View counter_app_minimum.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 '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, |
View write_your_first_app_bloc.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:io' show Platform; | |
import 'package:flutter/material.dart'; | |
import 'package:flutter/cupertino.dart' | |
show | |
CupertinoApp, | |
CupertinoButton, | |
CupertinoColors, | |
CupertinoPageRoute, |
View bloc_state.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 '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. |
View const_counter_app
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( |
NewerOlder