Skip to content

Instantly share code, notes, and snippets.

@eEQK
eEQK / main.dart
Last active April 9, 2024 09:29
automatically create and wire part/part of in dart
// dart run main.dart -f foo_form.dart -f foo_state.dart --link-to foo_screen.dart
import 'dart:io';
import 'package:args/args.dart';
const linkToOption = 'link-to';
void main(List<String> arguments) async {
final parser = ArgParser()
@eEQK
eEQK / main.dart
Created April 8, 2024 08:01
instant back transition minimal example
import 'package:flutter/material.dart';
void main() => runApp(const MyApp());
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
@eEQK
eEQK / main.dart
Created February 26, 2024 11:07
Generate flutter material color swatch code from a color
import 'package:flutter/material.dart';
void main() => runApp(const MyApp());
class MyApp extends StatefulWidget {
const MyApp({super.key});
@override
State<MyApp> createState() => _MyAppState();
}
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
theme: ThemeData(
useMaterial3: true,
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
debugShowCheckedModeBanner: false,