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 os | |
| org = "com.example" | |
| name = "app_name" | |
| cmd = "flutter create --org " + org + " --project-name " + name + " ."; | |
| packages = [ | |
| "cached_network_image", | |
| "collection", | |
| "copy_with_extension", | |
| "equatable", |
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
| // results: http://screens.gskinner.com/shawn/7BMqIUaAVi.mp4 | |
| import 'package:flutter/material.dart'; | |
| import 'package:focusable_control_builder/focusable_control_builder.dart'; | |
| class InkwellDemoTest extends StatelessWidget { | |
| @override | |
| Widget build(BuildContext context) { | |
| return Center( | |
| child: Column( |
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
| // Basic structure for inkwell effect | |
| // renders: http://screens.gskinner.com/shawn/vxKbE9nX0x.mp4 | |
| class _ButtonTest extends StatelessWidget { | |
| @override | |
| Widget build(BuildContext context) { | |
| return Center( | |
| child: Column( | |
| mainAxisSize: MainAxisSize.min, | |
| children: [ |
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'; | |
| import 'package:flutter/material.dart'; | |
| 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/material.dart'; | |
| import 'package:flutter/services.dart'; | |
| void main() { | |
| runApp(const MyApp()); | |
| } | |
| class MyApp extends StatelessWidget { | |
| const MyApp({Key? key}) : super(key: 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
| class DeeplinkExample extends StatefulWidget { | |
| @override | |
| _DeeplinkExampleState createState() => _DeeplinkExampleState(); | |
| } | |
| class _DeeplinkExampleState extends State<DeeplinkExample> { | |
| late NavStackController _controller; | |
| @override | |
| void initState() { |
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
| class DecoratedContainer extends StatelessWidget { | |
| const DecoratedContainer({ | |
| Key? key, | |
| this.color, | |
| this.borderColor = Colors.transparent, | |
| this.borderWidth = 0, | |
| this.borderRadius = 0, | |
| this.width, | |
| this.height, | |
| this.child, |
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
| class MyFoo extends StatefulWidget { | |
| const MyFoo({Key? key, required this.child}) : super(key: key); | |
| final Widget child; | |
| @override | |
| MyFooState createState() => MyFooState(); | |
| static MyFooState of(BuildContext context) => | |
| (context.dependOnInheritedWidgetOfExactType<_MyInheritedFoo>() as _MyInheritedFoo).state; |
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:path_to_regexp/path_to_regexp.dart'; | |
| class PathStackEntry { | |
| PathStackEntry({required this.path, required this.builder, this.maintainState = true, this.aliases}); | |
| final String path; | |
| // This wants the query string values | |
| final WidgetBuilder builder; | |
| final List<String>? aliases; | |
| final bool maintainState; |
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:cached_network_image/cached_network_image.dart'; | |
| import 'package:flutter/material.dart'; | |
| // Run this in skia rendering mode, and upload to a web server. | |
| // Observe as no images load. | |
| class CorsImageSpike extends StatelessWidget { | |
| @override | |
| Widget build(BuildContext context) { | |
| return MaterialApp( | |
| builder: (_, __) => Column( | |
| children: [ |