From e735457203eab2a76ad08941ff9752c5cf5de9f2 Mon Sep 17 00:00:00 2001 From: Guy Luz Date: Wed, 13 Dec 2023 11:52:35 +0200 Subject: [PATCH] Fixed all lint --- .idea/libraries/Dart_SDK.xml | 41 ++-- .idea/libraries/Flutter_Plugins.xml | 30 +-- analysis_options.yaml | 4 - lib/main.dart | 21 +- .../about_page_content_desktop.dart | 2 +- .../about_page_content_mobile_tablet.dart | 2 +- lib/presentation/faq_page/faq_page.dart | 2 +- lib/presentation/home_page/home_page.dart | 2 +- .../widgets/easy_to_set_up_benefit_block.dart | 2 +- ...privacy_and_open_source_benefit_block.dart | 2 +- .../integrations_page/integrations_page.dart | 2 +- .../widgets/home_page_second_part.dart | 2 +- .../widgets/home_page_thired_part.dart | 4 +- lib/presentation/news_page/news.dart | 2 +- lib/presentation/set_up_page/set_up_page.dart | 2 +- .../set_up_page_content_desktop.dart | 8 +- .../navigation_drawer/navigation_drawer.dart | 2 +- .../navigation_drawer_header.dart | 2 +- .../top_navigation_menu_desktop.dart | 196 ------------------ .../top_navigation_menu_mobile_tablet.dart | 2 +- pubspec.lock | 42 ++-- pubspec.yaml | 6 +- 22 files changed, 66 insertions(+), 312 deletions(-) delete mode 100644 lib/presentation/shared_widgets/top_navigation_menu/top_navigation_menu_desktop.dart diff --git a/.idea/libraries/Dart_SDK.xml b/.idea/libraries/Dart_SDK.xml index c634881..3696a2d 100644 --- a/.idea/libraries/Dart_SDK.xml +++ b/.idea/libraries/Dart_SDK.xml @@ -1,26 +1,27 @@ - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + diff --git a/.idea/libraries/Flutter_Plugins.xml b/.idea/libraries/Flutter_Plugins.xml index a52d7c7..fe4bdd3 100644 --- a/.idea/libraries/Flutter_Plugins.xml +++ b/.idea/libraries/Flutter_Plugins.xml @@ -1,33 +1,9 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + diff --git a/analysis_options.yaml b/analysis_options.yaml index 6888e0c..7773adc 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -17,7 +17,6 @@ analyzer: - "**/*.config.dart" - "lib/infrastructure/core/gen/**" - linter: rules: # Use parameter order as in json response @@ -26,6 +25,3 @@ linter: avoid_classes_with_only_static_members: false sort_constructors_first: true - - # Good packages document everything - public_member_api_docs: true diff --git a/lib/main.dart b/lib/main.dart index 4a1abc4..1c927ad 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -37,7 +37,7 @@ class MyApp extends StatelessWidget { bodySmall: TextStyle( color: Colors.white, ), - bodyMedium:TextStyle( + bodyMedium: TextStyle( color: Colors.white, ), bodyLarge: TextStyle( @@ -51,25 +51,6 @@ class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( - // title: 'Flutter Demo', - // theme: ThemeData( - // // This is the theme of your application. - // // - // // Try running your application with "flutter run". You'll see the - // // application has a blue toolbar. Then, without quitting the app, try - // // changing the primarySwatch below to Colors.green and then invoke - // // "hot reload" (press "r" in the console where you ran "flutter run", - // // or simply save your changes to "hot reload" in a Flutter IDE). - // // Notice that the counter didn't reset back to zero; the application - // // is not restarted. - // primarySwatch: Colors.blue, - // // This makes the visual density adapt to the platform that you run - // // the app on. For desktop platforms, the controls will be smaller and - // // closer together (more dense) than on mobile platforms. - // visualDensity: VisualDensity.adaptivePlatformDensity, - // ), - // home: MyHomePage(title: 'Flutter Demo Home Page'), - title: 'CyBear Jinni Smart Home', localizationsDelegates: context.localizationDelegates, supportedLocales: context.supportedLocales, diff --git a/lib/presentation/about_page/about_page_content_desktop.dart b/lib/presentation/about_page/about_page_content_desktop.dart index 053e795..145dc37 100644 --- a/lib/presentation/about_page/about_page_content_desktop.dart +++ b/lib/presentation/about_page/about_page_content_desktop.dart @@ -20,7 +20,7 @@ class AboutPageContentDesktop extends StatelessWidget { Theme.of(context).primaryColor, Theme.of(context).colorScheme.secondary, Theme.of(context).colorScheme.secondary, - Theme.of(context).primaryColor + Theme.of(context).primaryColor, ], ), ), diff --git a/lib/presentation/about_page/about_page_content_mobile_tablet.dart b/lib/presentation/about_page/about_page_content_mobile_tablet.dart index c43f93f..0da3fca 100644 --- a/lib/presentation/about_page/about_page_content_mobile_tablet.dart +++ b/lib/presentation/about_page/about_page_content_mobile_tablet.dart @@ -21,7 +21,7 @@ class AboutPageContentMobileTablet extends StatelessWidget { Theme.of(context).primaryColor, Theme.of(context).colorScheme.secondary, Theme.of(context).colorScheme.secondary, - Theme.of(context).primaryColor + Theme.of(context).primaryColor, ], ), ), diff --git a/lib/presentation/faq_page/faq_page.dart b/lib/presentation/faq_page/faq_page.dart index d3d33c6..fdc1b1f 100644 --- a/lib/presentation/faq_page/faq_page.dart +++ b/lib/presentation/faq_page/faq_page.dart @@ -19,7 +19,7 @@ class FaqPage extends StatelessWidget { Theme.of(context).primaryColor, Theme.of(context).colorScheme.secondary, Theme.of(context).colorScheme.secondary, - Theme.of(context).primaryColor + Theme.of(context).primaryColor, ], ), ), diff --git a/lib/presentation/home_page/home_page.dart b/lib/presentation/home_page/home_page.dart index 6445116..50dda75 100644 --- a/lib/presentation/home_page/home_page.dart +++ b/lib/presentation/home_page/home_page.dart @@ -21,7 +21,7 @@ class HomePage extends StatelessWidget { Theme.of(context).primaryColor, Theme.of(context).colorScheme.secondary, Theme.of(context).colorScheme.secondary, - Theme.of(context).primaryColor + Theme.of(context).primaryColor, ], ), ), diff --git a/lib/presentation/home_page/widgets/easy_to_set_up_benefit_block.dart b/lib/presentation/home_page/widgets/easy_to_set_up_benefit_block.dart index e574876..47cd728 100644 --- a/lib/presentation/home_page/widgets/easy_to_set_up_benefit_block.dart +++ b/lib/presentation/home_page/widgets/easy_to_set_up_benefit_block.dart @@ -49,7 +49,7 @@ class EasyToSetUpBenefitBlock extends StatelessWidget { ), ), ], - ) + ), ], ), const SizedBox( diff --git a/lib/presentation/home_page/widgets/privacy_and_open_source_benefit_block.dart b/lib/presentation/home_page/widgets/privacy_and_open_source_benefit_block.dart index 3192b4b..7af8356 100644 --- a/lib/presentation/home_page/widgets/privacy_and_open_source_benefit_block.dart +++ b/lib/presentation/home_page/widgets/privacy_and_open_source_benefit_block.dart @@ -54,7 +54,7 @@ class PrivacyAndOpenSourceBenefitBlock extends StatelessWidget { ), ), ], - ) + ), ], ), const SizedBox( diff --git a/lib/presentation/integrations_page/integrations_page.dart b/lib/presentation/integrations_page/integrations_page.dart index 3001b26..ecc3008 100644 --- a/lib/presentation/integrations_page/integrations_page.dart +++ b/lib/presentation/integrations_page/integrations_page.dart @@ -19,7 +19,7 @@ class IntegrationsPage extends StatelessWidget { Theme.of(context).primaryColor, Theme.of(context).colorScheme.secondary, Theme.of(context).colorScheme.secondary, - Theme.of(context).primaryColor + Theme.of(context).primaryColor, ], ), ), diff --git a/lib/presentation/new_home_page/widgets/home_page_second_part.dart b/lib/presentation/new_home_page/widgets/home_page_second_part.dart index 5317030..1ec1986 100644 --- a/lib/presentation/new_home_page/widgets/home_page_second_part.dart +++ b/lib/presentation/new_home_page/widgets/home_page_second_part.dart @@ -86,7 +86,7 @@ class HomePageSecondPart extends StatelessWidget { const SizedBox(), ], ), - ) + ), ], ), ], diff --git a/lib/presentation/new_home_page/widgets/home_page_thired_part.dart b/lib/presentation/new_home_page/widgets/home_page_thired_part.dart index 456685e..89dcac9 100644 --- a/lib/presentation/new_home_page/widgets/home_page_thired_part.dart +++ b/lib/presentation/new_home_page/widgets/home_page_thired_part.dart @@ -199,11 +199,11 @@ class HomePageThiredPart extends StatelessWidget { ), ], ), - ) + ), ], ), ), - ) + ), ], ), ], diff --git a/lib/presentation/news_page/news.dart b/lib/presentation/news_page/news.dart index 1a19c4d..5446e5e 100644 --- a/lib/presentation/news_page/news.dart +++ b/lib/presentation/news_page/news.dart @@ -20,7 +20,7 @@ class NewsTab extends StatelessWidget { Container( height: 20, ), - const Text('Empty_history').tr() + const Text('Empty_history').tr(), ], ); } diff --git a/lib/presentation/set_up_page/set_up_page.dart b/lib/presentation/set_up_page/set_up_page.dart index e9bcb7c..0d00fd7 100644 --- a/lib/presentation/set_up_page/set_up_page.dart +++ b/lib/presentation/set_up_page/set_up_page.dart @@ -19,7 +19,7 @@ class SetUpPage extends StatelessWidget { Theme.of(context).primaryColor, Theme.of(context).colorScheme.secondary, Theme.of(context).colorScheme.secondary, - Theme.of(context).primaryColor + Theme.of(context).primaryColor, ], ), ), diff --git a/lib/presentation/set_up_page/set_up_page_content_desktop.dart b/lib/presentation/set_up_page/set_up_page_content_desktop.dart index b454a6c..2978434 100644 --- a/lib/presentation/set_up_page/set_up_page_content_desktop.dart +++ b/lib/presentation/set_up_page/set_up_page_content_desktop.dart @@ -316,7 +316,7 @@ class SetUpPageContentDesktop extends StatelessWidget { const Icon(Icons.error), ), ), - ) + ), ], ), const SizedBox( @@ -369,7 +369,7 @@ class SetUpPageContentDesktop extends StatelessWidget { const Icon(Icons.error), ), ), - ) + ), ], ), const SizedBox( @@ -422,7 +422,7 @@ class SetUpPageContentDesktop extends StatelessWidget { const Icon(Icons.error), ), ), - ) + ), ], ), const SizedBox( @@ -568,7 +568,7 @@ class SetUpPageContentDesktop extends StatelessWidget { ), ), ], - ) + ), ], ), ], diff --git a/lib/presentation/shared_widgets/navigation_drawer/navigation_drawer.dart b/lib/presentation/shared_widgets/navigation_drawer/navigation_drawer.dart index 7f662e3..b267077 100644 --- a/lib/presentation/shared_widgets/navigation_drawer/navigation_drawer.dart +++ b/lib/presentation/shared_widgets/navigation_drawer/navigation_drawer.dart @@ -21,7 +21,7 @@ class NavigationDrawerWidget extends StatelessWidget { Theme.of(context).primaryColor, Theme.of(context).colorScheme.secondary, Theme.of(context).colorScheme.secondary, - Theme.of(context).primaryColor + Theme.of(context).primaryColor, ], ), ), diff --git a/lib/presentation/shared_widgets/navigation_drawer/navigation_drawer_header.dart b/lib/presentation/shared_widgets/navigation_drawer/navigation_drawer_header.dart index 2450942..e194bd9 100644 --- a/lib/presentation/shared_widgets/navigation_drawer/navigation_drawer_header.dart +++ b/lib/presentation/shared_widgets/navigation_drawer/navigation_drawer_header.dart @@ -17,7 +17,7 @@ class NavigationDrawerHeader extends StatelessWidget { Theme.of(context).primaryColor, Theme.of(context).colorScheme.secondary, Theme.of(context).colorScheme.secondary, - Theme.of(context).primaryColor + Theme.of(context).primaryColor, ], ), ), diff --git a/lib/presentation/shared_widgets/top_navigation_menu/top_navigation_menu_desktop.dart b/lib/presentation/shared_widgets/top_navigation_menu/top_navigation_menu_desktop.dart deleted file mode 100644 index 4a4ef32..0000000 --- a/lib/presentation/shared_widgets/top_navigation_menu/top_navigation_menu_desktop.dart +++ /dev/null @@ -1,196 +0,0 @@ -import 'package:cybear_jinni_site/my_singleton.dart'; -import 'package:cybear_jinni_site/presentation/home_page/home_page.dart'; -import 'package:cybear_jinni_site/presentation/route_names.dart'; -import 'package:flutter/material.dart'; -import 'package:font_awesome_flutter/font_awesome_flutter.dart'; - -/// The specific look for the top navigation menu for tablet desktop -class TopNavigationMenuDesktop extends StatelessWidget { - @override - Widget build(BuildContext context) { - return Container( - margin: const EdgeInsets.all(20), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - ClipPath( - clipper: CrosRightSizde(), - child: ColoredBox( - color: Colors.black87, - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - const SizedBox( - height: 72, - width: 20, - ), - TextButton( - onPressed: () { - if (MySingleton.getCurrentPageName != 'landingPage' && - MySingleton.getCurrentPageName != homeRoute) { - Navigator.pushNamed( - context, - homeRoute, - ); - } else { - Navigator.pushReplacementNamed(context, homeRoute); - } - }, - child: const Image( - height: 60, - image: AssetImage( - 'assets/images/cbj_app_icon_no_bg.png', - ), - fit: BoxFit.fitHeight, - ), - ), - const SizedBox( - width: 40, - ) - ], - ), - ), - ), - ClipPath( - clipper: CrosLeftSizde(), - child: ColoredBox( - color: Colors.black87, - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - const SizedBox( - width: 40, - ), - TextButton( - onPressed: () { - if (MySingleton.getCurrentPageName != aboutRoute) { - Navigator.pushNamed(context, aboutRoute); - } else { - Navigator.pushReplacementNamed(context, aboutRoute); - } - }, - child: Tab( - icon: FaIcon( - FontAwesomeIcons.addressCard, - color: Theme.of(context).textTheme.bodyLarge!.color, - ), - child: Text( - 'About', - style: TextStyle( - color: Theme.of(context).textTheme.bodyLarge!.color, - ), - ), - ), - ), - const SizedBox( - width: 20, - ), - TextButton( - onPressed: () { - if (MySingleton.getCurrentPageName != faqRoute) { - Navigator.pushNamed(context, faqRoute); - } else { - Navigator.pushReplacementNamed(context, faqRoute); - } - }, - child: Tab( - icon: FaIcon( - FontAwesomeIcons.circleQuestion, - color: Theme.of(context).textTheme.bodyLarge!.color, - ), - child: Text( - 'FAQ', - style: TextStyle( - color: Theme.of(context).textTheme.bodyLarge!.color, - ), - ), - ), - ), - const SizedBox( - width: 20, - ), - TextButton( - onPressed: () { - if (MySingleton.getCurrentPageName != setUpRoute) { - Navigator.pushNamed(context, setUpRoute); - } else { - Navigator.pushReplacementNamed(context, setUpRoute); - } - }, - child: Tab( - icon: FaIcon( - FontAwesomeIcons.shapes, - color: Theme.of(context).textTheme.bodyLarge!.color, - ), - child: Text( - 'Set Up', - style: TextStyle( - color: Theme.of(context).textTheme.bodyLarge!.color, - ), - ), - ), - ), - const SizedBox( - width: 20, - ), - TextButton( - onPressed: () { - if (MySingleton.getCurrentPageName != integrationsRoute) { - Navigator.pushNamed(context, integrationsRoute); - } else { - Navigator.pushReplacementNamed( - context, - integrationsRoute, - ); - } - }, - child: Tab( - icon: FaIcon( - FontAwesomeIcons.lightbulb, - color: Theme.of(context).textTheme.bodyLarge!.color, - ), - child: Text( - 'Integrations', - style: TextStyle( - color: Theme.of(context).textTheme.bodyLarge!.color, - ), - ), - ), - ), - const SizedBox( - width: 20, - ), - TextButton( - onPressed: () { - if (MySingleton.getCurrentPageName != 'landingPage' && - MySingleton.getCurrentPageName != homeRoute) { - Navigator.pushNamed(context, homeRoute); - } else { - Navigator.pushReplacementNamed(context, homeRoute); - } - }, - child: Tab( - icon: FaIcon( - FontAwesomeIcons.house, - color: Theme.of(context).textTheme.bodyLarge!.color, - ), - child: Text( - 'Home', - style: TextStyle( - color: Theme.of(context).textTheme.bodyLarge!.color, - ), - ), - ), - ), - const SizedBox( - width: 20, - ), - ], - ), - ), - ) - ], - ), - ); - } -} diff --git a/lib/presentation/shared_widgets/top_navigation_menu/top_navigation_menu_mobile_tablet.dart b/lib/presentation/shared_widgets/top_navigation_menu/top_navigation_menu_mobile_tablet.dart index 4314a70..02cdce9 100644 --- a/lib/presentation/shared_widgets/top_navigation_menu/top_navigation_menu_mobile_tablet.dart +++ b/lib/presentation/shared_widgets/top_navigation_menu/top_navigation_menu_mobile_tablet.dart @@ -18,7 +18,7 @@ class TopNavigationMenuMobileTablet extends StatelessWidget { FontAwesomeIcons.bars, color: Theme.of(context).textTheme.bodyLarge!.color, ), - ) + ), ], ), ); diff --git a/pubspec.lock b/pubspec.lock index 9dba81d..7a74d59 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -181,10 +181,10 @@ packages: dependency: transitive description: name: collection - sha256: "4a07be6cb69c84d677a6c3096fcf960cc3285a8330b4603e0d463d15d9bd934c" + sha256: f092b211a4319e98e5ff58223576de6c2803db36221657b46c82574721240687 url: "https://pub.dev" source: hosted - version: "1.17.1" + version: "1.17.2" convert: dependency: transitive description: @@ -193,14 +193,6 @@ packages: url: "https://pub.dev" source: hosted version: "3.1.1" - cool_nav: - dependency: "direct main" - description: - name: cool_nav - sha256: "68ddfae03e8a55b2dae1dfb54aa0c4c8111c9b6fc90eb4daec9a3dd706ecc8bc" - url: "https://pub.dev" - source: hosted - version: "0.1.0" crypto: dependency: transitive description: @@ -441,10 +433,10 @@ packages: dependency: transitive description: name: intl - sha256: a3715e3bc90294e971cb7dc063fbf3cd9ee0ebf8604ffeafabd9e6f16abbdbe6 + sha256: "3bc132a9dbce73a7e4a21a17d06e1878839ffbf975568bc875c60537824b0c4d" url: "https://pub.dev" source: hosted - version: "0.18.0" + version: "0.18.1" io: dependency: transitive description: @@ -505,18 +497,18 @@ packages: dependency: transitive description: name: matcher - sha256: "6501fbd55da300384b768785b83e5ce66991266cec21af89ab9ae7f5ce1c4cbb" + sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" url: "https://pub.dev" source: hosted - version: "0.12.15" + version: "0.12.16" material_color_utilities: dependency: transitive description: name: material_color_utilities - sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724 + sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41" url: "https://pub.dev" source: hosted - version: "0.2.0" + version: "0.5.0" meta: dependency: transitive description: @@ -814,10 +806,10 @@ packages: dependency: transitive description: name: source_span - sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250 + sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" url: "https://pub.dev" source: hosted - version: "1.9.1" + version: "1.10.0" sqflite: dependency: transitive description: @@ -886,10 +878,10 @@ packages: dependency: transitive description: name: test_api - sha256: eb6ac1540b26de412b3403a163d919ba86f6a973fe6cc50ae3541b80092fdcfb + sha256: "75760ffd7786fffdfb9597c35c5b27eaeec82be8edfb6d71d32651128ed7aab8" url: "https://pub.dev" source: hosted - version: "0.5.1" + version: "0.6.0" timing: dependency: transitive description: @@ -994,6 +986,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.1.0" + web: + dependency: transitive + description: + name: web + sha256: dc8ccd225a2005c1be616fe02951e2e342092edf968cf0844220383757ef8f10 + url: "https://pub.dev" + source: hosted + version: "0.1.4-beta" web_socket_channel: dependency: transitive description: @@ -1075,5 +1075,5 @@ packages: source: hosted version: "2.0.2" sdks: - dart: ">=3.0.0 <4.0.0" + dart: ">=3.1.0-185.0.dev <4.0.0" flutter: ">=3.10.0" diff --git a/pubspec.yaml b/pubspec.yaml index df4318c..6bc0d78 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -2,12 +2,11 @@ name: cybear_jinni_site description: Site for CyBear Jinni Smart Home version: 1.0.0+3 -publish_to: 'none' # Remove this line if you wish to publish to pub.dev +publish_to: "none" # Remove this line if you wish to publish to pub.dev environment: sdk: ^3.0.0 - flutter: # Ensures that the Material Icons font is included with your application. uses-material-design: true @@ -31,8 +30,6 @@ dependencies: bloc: ^8.1.2 # Show images from the internet and keep them in the cache directory. cached_network_image: ^3.2.3 - # Spotlight Bottom Navigation Bar - cool_nav: ^0.1.0 # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. cupertino_icons: ^1.0.5 @@ -81,4 +78,3 @@ dev_dependencies: injectable_generator: ^2.1.6 # Collection of lint rules for Dart and Flutter projects. lint: ^2.1.2 -