diff --git a/lib/controllers/MenuController.dart b/lib/controllers/MenuAppController.dart similarity index 86% rename from lib/controllers/MenuController.dart rename to lib/controllers/MenuAppController.dart index e57de4c..7e96627 100644 --- a/lib/controllers/MenuController.dart +++ b/lib/controllers/MenuAppController.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; -class MenuController extends ChangeNotifier { +class MenuAppController extends ChangeNotifier { final GlobalKey _scaffoldKey = GlobalKey(); GlobalKey get scaffoldKey => _scaffoldKey; diff --git a/lib/main.dart b/lib/main.dart index bbd8dcc..ef9f900 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,5 +1,5 @@ import 'package:admin/constants.dart'; -import 'package:admin/controllers/MenuController.dart'; +import 'package:admin/controllers/MenuAppController.dart'; import 'package:admin/screens/main/main_screen.dart'; import 'package:flutter/material.dart'; import 'package:google_fonts/google_fonts.dart'; @@ -25,7 +25,7 @@ class MyApp extends StatelessWidget { home: MultiProvider( providers: [ ChangeNotifierProvider( - create: (context) => MenuController(), + create: (context) => MenuAppController(), ), ], child: MainScreen(), diff --git a/lib/screens/dashboard/components/header.dart b/lib/screens/dashboard/components/header.dart index 58ee66f..c6ff261 100644 --- a/lib/screens/dashboard/components/header.dart +++ b/lib/screens/dashboard/components/header.dart @@ -1,4 +1,4 @@ -import 'package:admin/controllers/MenuController.dart'; +import 'package:admin/controllers/MenuAppController.dart'; import 'package:admin/responsive.dart'; import 'package:flutter/material.dart'; import 'package:flutter_svg/flutter_svg.dart'; @@ -18,7 +18,7 @@ class Header extends StatelessWidget { if (!Responsive.isDesktop(context)) IconButton( icon: Icon(Icons.menu), - onPressed: context.read().controlMenu, + onPressed: context.read().controlMenu, ), if (!Responsive.isMobile(context)) Text( diff --git a/lib/screens/main/main_screen.dart b/lib/screens/main/main_screen.dart index a8a6002..a4b068f 100644 --- a/lib/screens/main/main_screen.dart +++ b/lib/screens/main/main_screen.dart @@ -1,4 +1,4 @@ -import 'package:admin/controllers/MenuController.dart'; +import 'package:admin/controllers/MenuAppController.dart'; import 'package:admin/responsive.dart'; import 'package:admin/screens/dashboard/dashboard_screen.dart'; import 'package:flutter/material.dart'; @@ -10,7 +10,7 @@ class MainScreen extends StatelessWidget { @override Widget build(BuildContext context) { return Scaffold( - key: context.read().scaffoldKey, + key: context.read().scaffoldKey, drawer: SideMenu(), body: SafeArea( child: Row( diff --git a/pubspec.lock b/pubspec.lock index 2f2fc8c..aa36e36 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -5,98 +5,112 @@ packages: dependency: transitive description: name: async - url: "https://pub.dartlang.org" + sha256: bfe67ef28df125b7dddcea62755991f807aa39a2492a23e1550161692950bbe0 + url: "https://pub.dev" source: hosted - version: "2.9.0" + version: "2.10.0" boolean_selector: dependency: transitive description: name: boolean_selector - url: "https://pub.dartlang.org" + sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" + url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.1" characters: dependency: transitive description: name: characters - url: "https://pub.dartlang.org" + sha256: e6a326c8af69605aec75ed6c187d06b349707a27fbff8222ca9cc2cff167975c + url: "https://pub.dev" source: hosted version: "1.2.1" charcode: dependency: transitive description: name: charcode - url: "https://pub.dartlang.org" + sha256: fb98c0f6d12c920a02ee2d998da788bca066ca5f148492b7085ee23372b12306 + url: "https://pub.dev" source: hosted version: "1.3.1" clock: dependency: transitive description: name: clock - url: "https://pub.dartlang.org" + sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf + url: "https://pub.dev" source: hosted version: "1.1.1" collection: dependency: transitive description: name: collection - url: "https://pub.dartlang.org" + sha256: cfc915e6923fe5ce6e153b0723c753045de46de1b4d63771530504004a45fae0 + url: "https://pub.dev" source: hosted - version: "1.16.0" + version: "1.17.0" crypto: dependency: transitive description: name: crypto - url: "https://pub.dartlang.org" + sha256: cf75650c66c0316274e21d7c43d3dea246273af5955bd94e8184837cd577575c + url: "https://pub.dev" source: hosted version: "3.0.1" cupertino_icons: dependency: "direct main" description: name: cupertino_icons - url: "https://pub.dartlang.org" + sha256: "486b7bc707424572cdf7bd7e812a0c146de3fd47ecadf070254cc60383f21dd8" + url: "https://pub.dev" source: hosted version: "1.0.3" data_table_2: dependency: "direct main" description: name: data_table_2 - url: "https://pub.dartlang.org" + sha256: "2b94faf7a71a4edaedbc76e39cda749a79ad70482813bbf950ac5ea918d0b337" + url: "https://pub.dev" source: hosted version: "2.0.3" equatable: dependency: transitive description: name: equatable - url: "https://pub.dartlang.org" + sha256: da851e4d8b36afbc98f11b65f6d12a72b9061f93b74327777565d978649d81cb + url: "https://pub.dev" source: hosted version: "2.0.2" fake_async: dependency: transitive description: name: fake_async - url: "https://pub.dartlang.org" + sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" + url: "https://pub.dev" source: hosted version: "1.3.1" ffi: dependency: transitive description: name: ffi - url: "https://pub.dartlang.org" + sha256: "2147e33e073790090f267d42cd2ae15673769d48a6792d6c6730e4103b461984" + url: "https://pub.dev" source: hosted version: "1.1.1" file: dependency: transitive description: name: file - url: "https://pub.dartlang.org" + sha256: bbbe4cbd826c19385c87dcb11d07af2b26c98ac9ed94c1cd65172818570e25b2 + url: "https://pub.dev" source: hosted version: "6.1.1" fl_chart: dependency: "direct main" description: name: fl_chart - url: "https://pub.dartlang.org" + sha256: "85f742db29ac9f6b96a1f12bea6bee5ce368e6a271bc619ceb2a081327c27e6a" + url: "https://pub.dev" source: hosted version: "0.36.1" flutter: @@ -108,7 +122,8 @@ packages: dependency: "direct main" description: name: flutter_svg - url: "https://pub.dartlang.org" + sha256: "9ac1967e2f72a08af11b05b39167920f90d043cf67163d13a544a358c8f31afa" + url: "https://pub.dev" source: hosted version: "0.22.0" flutter_test: @@ -120,147 +135,176 @@ packages: dependency: "direct main" description: name: google_fonts - url: "https://pub.dartlang.org" + sha256: c31d49dfbcef1a84592128d2d9e8767eebf5a919ac1e6f77d14dc36790ef1639 + url: "https://pub.dev" source: hosted version: "2.1.0" http: dependency: transitive description: name: http - url: "https://pub.dartlang.org" + sha256: b6f1f143a71e1fe1b34670f1acd6f13960ade2557c96b87e127e0cf661969791 + url: "https://pub.dev" source: hosted version: "0.13.3" http_parser: dependency: transitive description: name: http_parser - url: "https://pub.dartlang.org" + sha256: e362d639ba3bc07d5a71faebb98cde68c05bfbcfbbb444b60b6f60bb67719185 + url: "https://pub.dev" source: hosted version: "4.0.0" + js: + dependency: transitive + description: + name: js + sha256: "5528c2f391ededb7775ec1daa69e65a2d61276f7552de2b5f7b8d34ee9fd4ab7" + url: "https://pub.dev" + source: hosted + version: "0.6.5" matcher: dependency: transitive description: name: matcher - url: "https://pub.dartlang.org" + sha256: "16db949ceee371e9b99d22f88fa3a73c4e59fd0afed0bd25fc336eb76c198b72" + url: "https://pub.dev" source: hosted - version: "0.12.12" + version: "0.12.13" material_color_utilities: dependency: transitive description: name: material_color_utilities - url: "https://pub.dartlang.org" + sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724 + url: "https://pub.dev" source: hosted - version: "0.1.5" + version: "0.2.0" meta: dependency: transitive description: name: meta - url: "https://pub.dartlang.org" + sha256: "6c268b42ed578a53088d834796959e4a1814b5e9e164f147f580a386e5decf42" + url: "https://pub.dev" source: hosted version: "1.8.0" nested: dependency: transitive description: name: nested - url: "https://pub.dartlang.org" + sha256: "03bac4c528c64c95c722ec99280375a6f2fc708eec17c7b3f07253b626cd2a20" + url: "https://pub.dev" source: hosted version: "1.0.0" path: dependency: transitive description: name: path - url: "https://pub.dartlang.org" + sha256: db9d4f58c908a4ba5953fcee2ae317c94889433e5024c27ce74a37f94267945b + url: "https://pub.dev" source: hosted version: "1.8.2" path_drawing: dependency: transitive description: name: path_drawing - url: "https://pub.dartlang.org" + sha256: b3e5edec6981a3679e57061fe045176646ac2b3e9f88770262ef1ac3673bab19 + url: "https://pub.dev" source: hosted version: "0.5.1" path_parsing: dependency: transitive description: name: path_parsing - url: "https://pub.dartlang.org" + sha256: ee5c47c1058ad66b4a41746ec3996af9593d0858872807bcd64ac118f0700337 + url: "https://pub.dev" source: hosted version: "0.2.1" path_provider: dependency: transitive description: name: path_provider - url: "https://pub.dartlang.org" + sha256: cfdc261c62a7273be7e051b19d27e503927a40919932f790681042a038f3605d + url: "https://pub.dev" source: hosted version: "2.0.2" path_provider_linux: dependency: transitive description: name: path_provider_linux - url: "https://pub.dartlang.org" + sha256: "938d2b6591587bcb009d2109a6ea464fd8fb2a75dc6423171b0d0afb1d27c708" + url: "https://pub.dev" source: hosted version: "2.0.0" path_provider_macos: dependency: transitive description: name: path_provider_macos - url: "https://pub.dartlang.org" + sha256: eb58b896ea3a504f0b0fa7870646bda6935a6f752b2a54df33f97070dacca8d4 + url: "https://pub.dev" source: hosted version: "2.0.0" path_provider_platform_interface: dependency: transitive description: name: path_provider_platform_interface - url: "https://pub.dartlang.org" + sha256: c2af5a8a6369992d915f8933dfc23172071001359d17896e83db8be57db8a397 + url: "https://pub.dev" source: hosted version: "2.0.1" path_provider_windows: dependency: transitive description: name: path_provider_windows - url: "https://pub.dartlang.org" + sha256: "99bb2d003df56a2a846e23f716bbf713a1d36d3e2a7d7e99ca4b01aeae80045a" + url: "https://pub.dev" source: hosted version: "2.0.1" pedantic: dependency: transitive description: name: pedantic - url: "https://pub.dartlang.org" + sha256: "8f6460c77a98ad2807cd3b98c67096db4286f56166852d0ce5951bb600a63594" + url: "https://pub.dev" source: hosted version: "1.11.0" petitparser: dependency: transitive description: name: petitparser - url: "https://pub.dartlang.org" + sha256: "85e8f8b118afcccf948a9844d199e56260117400bd9b9982d87bf1d62ebc1690" + url: "https://pub.dev" source: hosted version: "4.1.0" platform: dependency: transitive description: name: platform - url: "https://pub.dartlang.org" + sha256: ebc79f16b5f6b609aad4a5e63447d4795d16f7adee46e93ed03200848c006735 + url: "https://pub.dev" source: hosted version: "3.0.0" plugin_platform_interface: dependency: transitive description: name: plugin_platform_interface - url: "https://pub.dartlang.org" + sha256: c2c49e16d42fd6983eb55e44b7f197fdf16b4da7aab7f8e1d21da307cad3fb02 + url: "https://pub.dev" source: hosted version: "2.0.0" process: dependency: transitive description: name: process - url: "https://pub.dartlang.org" + sha256: dc3c073b5bc0db4e0f3dbc6b69f8e9cf2f336dafb3db996242ebdacf94c295dd + url: "https://pub.dev" source: hosted version: "4.2.1" provider: dependency: "direct main" description: name: provider - url: "https://pub.dartlang.org" + sha256: "59471e0a4595e264625d3496af567ac85bdae1148ec985aff1e0555786f53ecf" + url: "https://pub.dev" source: hosted version: "5.0.0" sky_engine: @@ -272,79 +316,90 @@ packages: dependency: transitive description: name: source_span - url: "https://pub.dartlang.org" + sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250 + url: "https://pub.dev" source: hosted - version: "1.9.0" + version: "1.9.1" stack_trace: dependency: transitive description: name: stack_trace - url: "https://pub.dartlang.org" + sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5 + url: "https://pub.dev" source: hosted - version: "1.10.0" + version: "1.11.0" stream_channel: dependency: transitive description: name: stream_channel - url: "https://pub.dartlang.org" + sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8" + url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.1" string_scanner: dependency: transitive description: name: string_scanner - url: "https://pub.dartlang.org" + sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + url: "https://pub.dev" source: hosted - version: "1.1.1" + version: "1.2.0" term_glyph: dependency: transitive description: name: term_glyph - url: "https://pub.dartlang.org" + sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 + url: "https://pub.dev" source: hosted version: "1.2.1" test_api: dependency: transitive description: name: test_api - url: "https://pub.dartlang.org" + sha256: ad540f65f92caa91bf21dfc8ffb8c589d6e4dc0c2267818b4cc2792857706206 + url: "https://pub.dev" source: hosted - version: "0.4.12" + version: "0.4.16" typed_data: dependency: transitive description: name: typed_data - url: "https://pub.dartlang.org" + sha256: "53bdf7e979cfbf3e28987552fd72f637e63f3c8724c9e56d9246942dc2fa36ee" + url: "https://pub.dev" source: hosted version: "1.3.0" vector_math: dependency: transitive description: name: vector_math - url: "https://pub.dartlang.org" + sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + url: "https://pub.dev" source: hosted - version: "2.1.2" + version: "2.1.4" win32: dependency: transitive description: name: win32 - url: "https://pub.dartlang.org" + sha256: "6e4d8aa049a4853e2036a864733341496e1dea326f93a590d30f07bc2cb85119" + url: "https://pub.dev" source: hosted version: "2.1.1" xdg_directories: dependency: transitive description: name: xdg_directories - url: "https://pub.dartlang.org" + sha256: "0186b3f2d66be9a12b0295bddcf8b6f8c0b0cc2f85c6287344e2a6366bc28457" + url: "https://pub.dev" source: hosted version: "0.2.0" xml: dependency: transitive description: name: xml - url: "https://pub.dartlang.org" + sha256: "9d2cf96b38e3f523fb78f0102d1d4483f817f3c3a6d81f46bf1b7a430ae8d561" + url: "https://pub.dev" source: hosted version: "5.1.1" sdks: - dart: ">=2.17.0-0 <3.0.0" + dart: ">=2.18.0 <3.0.0" flutter: ">=1.24.0-7.0"