Skip to content

Commit

Permalink
const
Browse files Browse the repository at this point in the history
  • Loading branch information
knottx committed Aug 1, 2024
1 parent 9d0033b commit 2f64e0c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docs/flutter_bootstrap.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions docs/flutter_service_worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion docs/main.dart.js
Original file line number Diff line number Diff line change
Expand Up @@ -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<Object?> 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<Object?> 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()},
Expand Down
6 changes: 4 additions & 2 deletions lib/home_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,9 @@ class _HomeViewState extends State<HomeView> {
child: SafeArea(
child: Center(
child: Container(
constraints: const BoxConstraints(maxWidth: 600),
constraints: const BoxConstraints(
maxWidth: 600,
),
child: _body(state),
),
),
Expand Down Expand Up @@ -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'),
),
);
Expand Down

0 comments on commit 2f64e0c

Please sign in to comment.