From 2f64e0c7824d424ed3e78d86ca2535f65ac5b6fc Mon Sep 17 00:00:00 2001 From: Knot Date: Thu, 1 Aug 2024 14:21:42 +0700 Subject: [PATCH] const --- docs/flutter_bootstrap.js | 2 +- docs/flutter_service_worker.js | 4 ++-- docs/main.dart.js | 2 +- lib/home_page.dart | 6 ++++-- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/docs/flutter_bootstrap.js b/docs/flutter_bootstrap.js index 7040339..4f3ec3f 100644 --- a/docs/flutter_bootstrap.js +++ b/docs/flutter_bootstrap.js @@ -11,6 +11,6 @@ _flutter.buildConfig = {"engineRevision":"235db911ba279722f5e685f38b0ed30fa7e857 _flutter.loader.load({ serviceWorkerSettings: { - serviceWorkerVersion: "3324219889" + serviceWorkerVersion: "2062402959" } }); diff --git a/docs/flutter_service_worker.js b/docs/flutter_service_worker.js index 48d8737..a92fa05 100644 --- a/docs/flutter_service_worker.js +++ b/docs/flutter_service_worker.js @@ -3,11 +3,11 @@ const MANIFEST = 'flutter-app-manifest'; const TEMP = 'flutter-temp-cache'; const CACHE_NAME = 'flutter-app-cache'; -const RESOURCES = {"flutter_bootstrap.js": "62e8b08bedd4cd43eda32752c2be58de", +const RESOURCES = {"flutter_bootstrap.js": "5efa55cec421737052ff922540c4fca6", "version.json": "91691d7e65937b9a38e300c65cfd1280", "index.html": "2efe7dce8ccf1ee654680e2cd4f7b3f3", "/": "2efe7dce8ccf1ee654680e2cd4f7b3f3", -"main.dart.js": "6b03dbf24e2bba0a67f9fb1552f6378c", +"main.dart.js": "7c2348086b40840a3095137b7dd39d77", "flutter.js": "383e55f7f3cce5be08fcf1f3881f585c", "favicon.png": "5dcef449791fa27946b3d35ad8803796", "icons/Icon-192.png": "ac9a721a12bbc803b44f645561ecb1e1", diff --git a/docs/main.dart.js b/docs/main.dart.js index fe263a6..ba3851f 100644 --- a/docs/main.dart.js +++ b/docs/main.dart.js @@ -77809,7 +77809,7 @@ i=A.a7(i).ax s=i.p2 i=s==null?i.k2:s s=A.aoe(r,new A.hs(4,A.u9(8),B.ld),r,r,r,r,r,r,!0,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,"Name",r,r,r,r,r,r,r,r,r,r,r,r,r) -return A.mX(r,new A.xL(A.apz(new A.IX(B.fd,o,A.akg(!0,A.oY(A.j5(r,A.UF(A.b([A.j5(r,new A.yJ(p.e,s,B.MH,B.ks,B.LW,B.LX,1,!0,r),B.B,r,r,new A.dF(i,r,r,j,r,r,B.b_),r,r,B.fd,r),B.kk,p.AD("import 'package:equatable/equatable.dart';\n\nenum "+l+"PageStatus {\n initial,\n loading,\n ready,\n failure,\n ;\n\n bool get isLoading => this == "+l+"PageStatus.loading;\n}\n\nclass "+l+"PageState extends Equatable {\n final "+l+"PageStatus status;\n final Object? error;\n\n const "+l+"PageState({\n this.status = "+l+"PageStatus.initial,\n this.error,\n });\n\n @override\n List get props => [\n status,\n error,\n ];\n\n "+l+"PageState copyWith({\n "+l+"PageStatus? status,\n Object? error,\n }) {\n return "+l+"PageState(\n status: status ?? this.status,\n error: error ?? this.error,\n );\n }\n\n "+l+"PageState loading() {\n return copyWith(\n status: "+l+"PageStatus.loading,\n );\n }\n\n "+l+"PageState ready() {\n return copyWith(\n status: "+l+"PageStatus.ready,\n );\n }\n\n "+l+"PageState failure(\n Object error,\n ) {\n return copyWith(\n status: "+l+"PageStatus.failure,\n error: error,\n );\n }\n}\n",k+"_page_state.dart"),B.kk,p.AD("import 'package:flutter_bloc/flutter_bloc.dart';\n\nimport '"+k+q+l+"PageCubit extends Cubit<"+l+"PageState> {\n "+l+"PageCubit() : super(const "+l+"PageState());\n}\n",k+"_page_cubit.dart"),B.kk,p.AD("import 'package:flutter/material.dart';\nimport 'package:flutter_bloc/flutter_bloc.dart';\n\nimport 'cubit/"+k+"_page_cubit.dart';\nimport 'cubit/"+k+q+l+"Page extends StatelessWidget {\n const "+l+"Page({super.key});\n\n @override\n Widget build(BuildContext context) {\n return BlocProvider(\n create: (context) => "+l+"PageCubit(),\n child: const "+l+"View(),\n );\n }\n}\n\nclass "+l+"View extends StatefulWidget {\n const "+l+"View({super.key});\n\n @override\n State<"+l+"View> createState() => _"+l+"ViewState();\n}\n\nclass _"+l+"ViewState extends State<"+l+"View> {\n @override\n Widget build(BuildContext context) {\n return BlocConsumer<"+l+"PageCubit, "+l+"PageState>(\n builder: (context, state) {\n return Scaffold(\n appBar: AppBar(\n title: const Text('"+m+"'),\n ),\n body: Center(\n child: Text('"+m+"'),\n ),\n );\n },\n listener: _listener,\n );\n }\n\n void _listener(BuildContext context, "+l+"PageState state) {\n switch (state.status) {\n case "+l+"PageStatus.initial:\n case "+l+"PageStatus.loading:\n case "+l+"PageStatus.ready:\n break;\n\n case "+l+"PageStatus.failure:\n break;\n }\n }\n}\n",A.a4z(n).KS()+"_page.dart")],t.E),B.m_,B.ct),B.B,r,B.zr,r,r,r,r,r),r,r),!0),r),o),r),B.av,!1,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,new A.acn(a),r,r,r,r,r,r)}, +return A.mX(r,new A.xL(A.apz(new A.IX(B.fd,o,A.akg(!0,A.oY(A.j5(r,A.UF(A.b([A.j5(r,new A.yJ(p.e,s,B.MH,B.ks,B.LW,B.LX,1,!0,r),B.B,r,r,new A.dF(i,r,r,j,r,r,B.b_),r,r,B.fd,r),B.kk,p.AD("import 'package:equatable/equatable.dart';\n\nenum "+l+"PageStatus {\n initial,\n loading,\n ready,\n failure,\n ;\n\n bool get isLoading => this == "+l+"PageStatus.loading;\n}\n\nclass "+l+"PageState extends Equatable {\n final "+l+"PageStatus status;\n final Object? error;\n\n const "+l+"PageState({\n this.status = "+l+"PageStatus.initial,\n this.error,\n });\n\n @override\n List get props => [\n status,\n error,\n ];\n\n "+l+"PageState copyWith({\n "+l+"PageStatus? status,\n Object? error,\n }) {\n return "+l+"PageState(\n status: status ?? this.status,\n error: error ?? this.error,\n );\n }\n\n "+l+"PageState loading() {\n return copyWith(\n status: "+l+"PageStatus.loading,\n );\n }\n\n "+l+"PageState ready() {\n return copyWith(\n status: "+l+"PageStatus.ready,\n );\n }\n\n "+l+"PageState failure(\n Object error,\n ) {\n return copyWith(\n status: "+l+"PageStatus.failure,\n error: error,\n );\n }\n}\n",k+"_page_state.dart"),B.kk,p.AD("import 'package:flutter_bloc/flutter_bloc.dart';\n\nimport '"+k+q+l+"PageCubit extends Cubit<"+l+"PageState> {\n "+l+"PageCubit() : super(const "+l+"PageState());\n}\n",k+"_page_cubit.dart"),B.kk,p.AD("import 'package:flutter/material.dart';\nimport 'package:flutter_bloc/flutter_bloc.dart';\n\nimport 'cubit/"+k+"_page_cubit.dart';\nimport 'cubit/"+k+q+l+"Page extends StatelessWidget {\n const "+l+"Page({super.key});\n\n @override\n Widget build(BuildContext context) {\n return BlocProvider(\n create: (context) => "+l+"PageCubit(),\n child: const "+l+"View(),\n );\n }\n}\n\nclass "+l+"View extends StatefulWidget {\n const "+l+"View({super.key});\n\n @override\n State<"+l+"View> createState() => _"+l+"ViewState();\n}\n\nclass _"+l+"ViewState extends State<"+l+"View> {\n @override\n Widget build(BuildContext context) {\n return BlocConsumer<"+l+"PageCubit, "+l+"PageState>(\n builder: (context, state) {\n return Scaffold(\n appBar: AppBar(\n title: const Text('"+m+"'),\n ),\n body: const Center(\n child: Text('"+m+"'),\n ),\n );\n },\n listener: _listener,\n );\n }\n\n void _listener(BuildContext context, "+l+"PageState state) {\n switch (state.status) {\n case "+l+"PageStatus.initial:\n case "+l+"PageStatus.loading:\n case "+l+"PageStatus.ready:\n break;\n\n case "+l+"PageStatus.failure:\n break;\n }\n }\n}\n",A.a4z(n).KS()+"_page.dart")],t.E),B.m_,B.ct),B.B,r,B.zr,r,r,r,r,r),r,r),!0),r),o),r),B.av,!1,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,new A.acn(a),r,r,r,r,r,r)}, $S:442} A.acn.prototype={ $0(){A.anR(this.a).hw()}, diff --git a/lib/home_page.dart b/lib/home_page.dart index c3b4c39..300fbcd 100644 --- a/lib/home_page.dart +++ b/lib/home_page.dart @@ -75,7 +75,9 @@ class _HomeViewState extends State { child: SafeArea( child: Center( child: Container( - constraints: const BoxConstraints(maxWidth: 600), + constraints: const BoxConstraints( + maxWidth: 600, + ), child: _body(state), ), ), @@ -211,7 +213,7 @@ class _${namePascalCase}ViewState extends State<${namePascalCase}View> { appBar: AppBar( title: const Text('$nameTitleCase'), ), - body: Center( + body: const Center( child: Text('$nameTitleCase'), ), );