yaz 0.0.6+1 yaz: ^0.0.6+1 copied to clipboard
Yaz, State User Options and Content Manager Package For Flutter Client
import 'package:flutter/material.dart';
import 'package:yaz/yaz.dart';
import 'collections_changes_2.dart';
import 'collections_changes_3.dart';
import 'content_list.dart';
import 'logo_paint.dart';
import 'multiple_value_change.dart';
import 'single_variable_notifier.dart';
import 'stream_notifier.dart';
import 'string_change.dart';
void main() {
UserOption.create(value: true, name: 'always_notify_built_debug');
runApp(const MyApp());
}
///
class MyApp extends StatelessWidget {
///
const MyApp({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) => MaterialApp(
debugShowCheckedModeBanner: false,
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: Scaffold(
body: SafeArea(
child: Center(
child: Builder(
builder: (c) => Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
TextButton(
onPressed: () {
Navigator.of(c).push<void>(MaterialPageRoute(
builder: (c) => const YazLogo()));
},
child: const Text('Logo')),
TextButton(
onPressed: () {
Navigator.of(c).push<void>(MaterialPageRoute(
builder: (c) => StreamNotifierExample()));
},
child: const Text('Stream Notifer')),
TextButton(
onPressed: () {
Navigator.of(c).push<void>(MaterialPageRoute(
builder: (c) => StringChange()));
},
child: const Text('String Change')),
TextButton(
onPressed: () {
Navigator.of(c).push<void>(MaterialPageRoute(
builder: (c) => SingleVariable()));
},
child:
const Text('Single Variable State Manager')),
TextButton(
onPressed: () {
Navigator.of(c).push<void>(MaterialPageRoute(
builder: (c) => MultipleValueChange()));
},
child: const Text(
'Multiple Variable State Manager')),
TextButton(
onPressed: () {
Navigator.of(c).push<void>(MaterialPageRoute(
builder: (c) => CollectionChanges2()));
},
// ignore: lines_longer_than_80_chars
child: const Text(
'Collection State Manager (Method 2- MidWay)')),
TextButton(
onPressed: () {
Navigator.of(c).push<void>(MaterialPageRoute(
builder: (c) => CollectionChanges3()));
},
// ignore: lines_longer_than_80_chars
child: const Text(
'Collection State Manager (Method 3- GoodWay)')),
TextButton(
onPressed: () {
Navigator.of(c).push<void>(MaterialPageRoute(
builder: (c) => const ContentList()));
},
child: const Text('Content Controller'))
],
)),
),
),
),
);
}