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/foundation.dart'; | |
import 'package:flutter/material.dart'; | |
// Widget builder allows for null | |
typedef MaybeBuildWidgetType = Widget? Function(BuildContext context); | |
/// Creates a widget that rebuilds when the given listenable calls | |
/// notifyListeners() function | |
class ListenableWidgetBuilder extends StatefulWidget { | |
/// The arguments is not required. |
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 '/listenable_widget_builder.dart'; | |
import '/main_listenable.dart'; | |
/// Allows you to use a ChangeNotifier as a Mixin | |
/// | |
/// setBuilder(WidgetBuilder? builder) rebuilds with every setState() call. | |
/// |
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 'impl_change_notifier_mixin.dart'; | |
void main() { | |
runApp(const MyApp()); | |
} | |
class MyApp extends StatelessWidget { |
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/foundation.dart'; | |
import 'package:flutter/material.dart'; | |
/// Highlights UI while debugging. | |
import 'package:flutter/rendering.dart' as debug; | |
void main() => runApp(MyApp()); | |
/// | |
class MyApp extends StatelessWidget { |
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/foundation.dart'; | |
import 'package:flutter/material.dart'; | |
void main() => runApp(const MyApp()); | |
class MyApp extends StatelessWidget { | |
const MyApp({super.key}); | |
@override |
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
// | |
// Any State object 'with' this mixin has then a built-in InheritedWidget | |
// | |
// | |
import 'package:flutter/material.dart'; | |
/// Supplies an InheritedWidget to a State class | |
/// | |
mixin InheritedWidgetStateMixin<T extends StatefulWidget> on State<T> { |
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 'package:state_extended/state_extended.dart'; | |
/// Pass the boolean true take make this humble example app more efficient. | |
void main() => runApp(const StateXCounterPage(useInherited: false)); | |
class StateXCounterPage extends StatefulWidget { | |
const StateXCounterPage({ | |
super.key, |
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 'package:state_extended/state_extended.dart'; | |
void main() => runApp(const MyApp(key: Key('MyApp'))); | |
/// README.md example app | |
class MyApp extends StatefulWidget { | |
/// |
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:fluttery_framework/view.dart'; | |
import 'package:fluttery_framework/controller.dart'; | |
void main() => runApp(MyApp()); | |
class MyApp extends AppStatefulWidget { | |
MyApp({Key? key}) : super(key: key); | |
@override |
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
/// | |
/// 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'; |
NewerOlder