From bafd12e13964389872dc9781d285a191866ea990 Mon Sep 17 00:00:00 2001 From: mathru Date: Fri, 19 May 2023 15:08:15 +0900 Subject: [PATCH] docs: ReadMe Revision. --- .vscode/settings.json | 3 +- README.md | 75 +++++++++++++++----------- packages/masamune/README.md | 75 +++++++++++++++----------- packages/masamune/example/pubspec.lock | 66 +++++++++++++---------- packages/masamune/pubspec.lock | 20 ++++--- 5 files changed, 139 insertions(+), 100 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 7d1a672cd..99020bb2a 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,3 +1,4 @@ { - "dart.runPubGetOnPubspecChanges": "never" + "dart.runPubGetOnPubspecChanges": "never", + "cmake.sourceDirectory": "/Users/mathru/Documents/github/flutter_masamune/packages/katana_auth/example/linux" } \ No newline at end of file diff --git a/README.md b/README.md index 805f775a8..4d9822db6 100644 --- a/README.md +++ b/README.md @@ -176,6 +176,8 @@ Describe the contents of the screen UI inside the `build`, just as you would wit import 'package:flutter/material.dart'; // ignore: unused_import, unnecessary_import import 'package:masamune/masamune.dart'; +// ignore: unused_import, unnecessary_import +import 'package:masamune_universal_ui/masamune_universal_ui.dart'; // ignore: unused_import, unnecessary_import import '/main.dart'; @@ -213,7 +215,7 @@ class TestPage extends PageScopedWidget { // Describes the structure of the page. // TODO: Implement the view. - return Scaffold(); + return UniversalScaffold(); } } ``` @@ -649,9 +651,9 @@ Widget build(BuildContext context, PageRef ref) { // Describes the structure of the page. // TODO: Implement the view. - return Scaffold( - appBar: AppBar(title: Text("Title"), backgroundColor: theme.color.secondary), - body: Column( + return UniversalScaffold( + appBar: UniversalAppBar(title: Text("Title"), backgroundColor: theme.color.secondary), + body: UniversalColumn( crossAxisAlignment: CrossAxisAlignment.start, children:[ Center(child: CircleAvatar(backgroundImage: theme.asset.userIcon.provider)), @@ -925,42 +927,51 @@ Modal.confirm( ## Responsive layout -It is possible to implement a responsive grid layout as follows. +UniversalUI allows users to create UIs across platforms with different screen sizes and orientations, such as PC and mobile, without having to be aware of the differences. ```dart -ResponsiveBuilder( - builder: (context) => [ - ResponsiveRow( +@override +Widget build(BuildContext context, PageRef ref) { + return UniversalScaffold( + breakpoint: Breakpoint.sm, + sideBar: UniversalSideBar( + decoration: const BoxDecoration( + border: Border(right: BorderSide(color: Colors.grey)), + ), children: [ - ResponsiveCol( - lg: 12, - child: Container( - color: Colors.red, - height: 100, + for (var i = 0; i < 100; i++) + ListTile( + tileColor: Colors.blue, + title: Text((i + 1).toString()), ), - ), ], ), - ResponsiveRow( + appBar: UniversalSliverAppBar( + title: const Text("UniversalViewPage"), + subtitle: const Text("UniversalViewPage"), + titlePosition: UniversalAppBarTitlePosition.bottom, + background: UniversalAppBarBackground(theme.asset.image.provider), + ), + body: UniversalListView( + onRefresh: () { + return Future.delayed(1.s); + }, + padding: const EdgeInsets.only(top: 32), children: [ - ResponsiveCol( - sm: 6, - child: Container( - color: Colors.green, - height: 100, - ), - ), - ResponsiveCol( - sm: 6, - child: Container( - color: Colors.blue, - height: 100, - ), + UniversalColumn( + children: [ + ...List.generate(100, (i) { + return ListTile( + tileColor: Colors.red, + title: Text((i + 1).toString()), + ); + }).mapResponsive(sm: 6, md: 4), + ], ), ], ), - ], -); + ); +} ``` For other details, please see the package details page. @@ -969,9 +980,9 @@ katana_ui [https://pub.dev/packages/katana_ui](https://pub.dev/packages/katana_ui) -katana_responsive +masamune_universal_ui -[https://pub.dev/packages/katana_responsive](https://pub.dev/packages/katana_responsive) +[https://pub.dev/packages/masamune_universal_ui](https://pub.dev/packages/masamune_universal_ui) ## Authentication diff --git a/packages/masamune/README.md b/packages/masamune/README.md index 805f775a8..4d9822db6 100644 --- a/packages/masamune/README.md +++ b/packages/masamune/README.md @@ -176,6 +176,8 @@ Describe the contents of the screen UI inside the `build`, just as you would wit import 'package:flutter/material.dart'; // ignore: unused_import, unnecessary_import import 'package:masamune/masamune.dart'; +// ignore: unused_import, unnecessary_import +import 'package:masamune_universal_ui/masamune_universal_ui.dart'; // ignore: unused_import, unnecessary_import import '/main.dart'; @@ -213,7 +215,7 @@ class TestPage extends PageScopedWidget { // Describes the structure of the page. // TODO: Implement the view. - return Scaffold(); + return UniversalScaffold(); } } ``` @@ -649,9 +651,9 @@ Widget build(BuildContext context, PageRef ref) { // Describes the structure of the page. // TODO: Implement the view. - return Scaffold( - appBar: AppBar(title: Text("Title"), backgroundColor: theme.color.secondary), - body: Column( + return UniversalScaffold( + appBar: UniversalAppBar(title: Text("Title"), backgroundColor: theme.color.secondary), + body: UniversalColumn( crossAxisAlignment: CrossAxisAlignment.start, children:[ Center(child: CircleAvatar(backgroundImage: theme.asset.userIcon.provider)), @@ -925,42 +927,51 @@ Modal.confirm( ## Responsive layout -It is possible to implement a responsive grid layout as follows. +UniversalUI allows users to create UIs across platforms with different screen sizes and orientations, such as PC and mobile, without having to be aware of the differences. ```dart -ResponsiveBuilder( - builder: (context) => [ - ResponsiveRow( +@override +Widget build(BuildContext context, PageRef ref) { + return UniversalScaffold( + breakpoint: Breakpoint.sm, + sideBar: UniversalSideBar( + decoration: const BoxDecoration( + border: Border(right: BorderSide(color: Colors.grey)), + ), children: [ - ResponsiveCol( - lg: 12, - child: Container( - color: Colors.red, - height: 100, + for (var i = 0; i < 100; i++) + ListTile( + tileColor: Colors.blue, + title: Text((i + 1).toString()), ), - ), ], ), - ResponsiveRow( + appBar: UniversalSliverAppBar( + title: const Text("UniversalViewPage"), + subtitle: const Text("UniversalViewPage"), + titlePosition: UniversalAppBarTitlePosition.bottom, + background: UniversalAppBarBackground(theme.asset.image.provider), + ), + body: UniversalListView( + onRefresh: () { + return Future.delayed(1.s); + }, + padding: const EdgeInsets.only(top: 32), children: [ - ResponsiveCol( - sm: 6, - child: Container( - color: Colors.green, - height: 100, - ), - ), - ResponsiveCol( - sm: 6, - child: Container( - color: Colors.blue, - height: 100, - ), + UniversalColumn( + children: [ + ...List.generate(100, (i) { + return ListTile( + tileColor: Colors.red, + title: Text((i + 1).toString()), + ); + }).mapResponsive(sm: 6, md: 4), + ], ), ], ), - ], -); + ); +} ``` For other details, please see the package details page. @@ -969,9 +980,9 @@ katana_ui [https://pub.dev/packages/katana_ui](https://pub.dev/packages/katana_ui) -katana_responsive +masamune_universal_ui -[https://pub.dev/packages/katana_responsive](https://pub.dev/packages/katana_responsive) +[https://pub.dev/packages/masamune_universal_ui](https://pub.dev/packages/masamune_universal_ui) ## Authentication diff --git a/packages/masamune/example/pubspec.lock b/packages/masamune/example/pubspec.lock index 65ef8504e..6e51173f7 100644 --- a/packages/masamune/example/pubspec.lock +++ b/packages/masamune/example/pubspec.lock @@ -254,6 +254,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.0" + flutter_rating_bar: + dependency: transitive + description: + name: flutter_rating_bar + sha256: d2af03469eac832c591a1eba47c91ecc871fe5708e69967073c043b2d775ed93 + url: "https://pub.dev" + source: hosted + version: "4.0.1" flutter_test: dependency: "direct dev" description: flutter @@ -382,182 +390,182 @@ packages: path: "../../katana" relative: true source: path - version: "2.0.0" + version: "2.0.1" katana_auth: dependency: "direct overridden" description: path: "../../katana_auth" relative: true source: path - version: "2.0.0" + version: "2.0.1" katana_form: dependency: "direct overridden" description: path: "../../katana_form" relative: true source: path - version: "2.0.3" + version: "2.1.0" katana_functions: dependency: "direct overridden" description: path: "../../katana_functions" relative: true source: path - version: "2.0.0" + version: "2.0.1" katana_indicator: dependency: "direct overridden" description: path: "../../katana_indicator" relative: true source: path - version: "2.0.0" + version: "2.0.1" katana_listenables: dependency: "direct overridden" description: path: "../../katana_listenables" relative: true source: path - version: "2.0.0" + version: "2.0.3" katana_listenables_annotation: dependency: "direct overridden" description: path: "../../katana_listenables_annotation" relative: true source: path - version: "2.0.0" + version: "2.0.2" katana_listenables_builder: dependency: "direct overridden" description: path: "../../katana_listenables_builder" relative: true source: path - version: "2.0.0" + version: "2.0.3" katana_localization: dependency: "direct overridden" description: path: "../../katana_localization" relative: true source: path - version: "2.0.1" + version: "2.0.4" katana_localization_annotation: dependency: "direct overridden" description: path: "../../katana_localization_annotation" relative: true source: path - version: "2.0.1" + version: "2.0.3" katana_localization_builder: dependency: "direct overridden" description: path: "../../katana_localization_builder" relative: true source: path - version: "2.0.1" + version: "2.0.4" katana_logger: dependency: "direct overridden" description: path: "../../katana_logger" relative: true source: path - version: "2.0.0" + version: "2.0.1" katana_model: dependency: "direct overridden" description: path: "../../katana_model" relative: true source: path - version: "2.0.0" + version: "2.0.1" katana_prefs: dependency: "direct overridden" description: path: "../../katana_prefs" relative: true source: path - version: "2.0.0" + version: "2.0.2" katana_prefs_annotation: dependency: "direct overridden" description: path: "../../katana_prefs_annotation" relative: true source: path - version: "2.0.0" + version: "2.0.2" katana_prefs_builder: dependency: "direct overridden" description: path: "../../katana_prefs_builder" relative: true source: path - version: "2.0.0" + version: "2.0.2" katana_router: dependency: "direct overridden" description: path: "../../katana_router" relative: true source: path - version: "2.0.1" + version: "2.0.3" katana_router_annotation: dependency: "direct overridden" description: path: "../../katana_router_annotation" relative: true source: path - version: "2.0.1" + version: "2.0.3" katana_router_builder: dependency: "direct overridden" description: path: "../../katana_router_builder" relative: true source: path - version: "2.0.1" + version: "2.0.3" katana_scoped: dependency: "direct overridden" description: path: "../../katana_scoped" relative: true source: path - version: "2.0.0" + version: "2.0.1" katana_shorten: dependency: "direct overridden" description: path: "../../katana_shorten" relative: true source: path - version: "2.0.0" + version: "2.0.1" katana_storage: dependency: "direct overridden" description: path: "../../katana_storage" relative: true source: path - version: "2.0.0" + version: "2.0.1" katana_theme: dependency: "direct overridden" description: path: "../../katana_theme" relative: true source: path - version: "2.0.0" + version: "2.0.2" katana_theme_annotation: dependency: "direct overridden" description: path: "../../katana_theme_annotation" relative: true source: path - version: "2.0.0" + version: "2.0.2" katana_theme_builder: dependency: "direct overridden" description: path: "../../katana_theme_builder" relative: true source: path - version: "2.0.0" + version: "2.0.2" katana_ui: dependency: "direct overridden" description: path: "../../katana_ui" relative: true source: path - version: "2.0.0" + version: "2.0.2" lints: dependency: transitive description: @@ -580,21 +588,21 @@ packages: path: ".." relative: true source: path - version: "2.0.5" + version: "2.0.14" masamune_annotation: dependency: "direct overridden" description: path: "../../masamune_annotation" relative: true source: path - version: "2.0.0" + version: "2.0.1" masamune_builder: dependency: "direct dev" description: path: "../../masamune_builder" relative: true source: path - version: "2.0.2" + version: "2.0.10" matcher: dependency: transitive description: diff --git a/packages/masamune/pubspec.lock b/packages/masamune/pubspec.lock index 018ff1587..bac2caa24 100644 --- a/packages/masamune/pubspec.lock +++ b/packages/masamune/pubspec.lock @@ -150,6 +150,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.0" + flutter_rating_bar: + dependency: transitive + description: + name: flutter_rating_bar + sha256: d2af03469eac832c591a1eba47c91ecc871fe5708e69967073c043b2d775ed93 + url: "https://pub.dev" + source: hosted + version: "4.0.1" flutter_web_plugins: dependency: transitive description: flutter @@ -247,7 +255,7 @@ packages: path: "../katana_form" relative: true source: path - version: "2.0.4" + version: "2.2.2" katana_functions: dependency: "direct main" description: @@ -268,14 +276,14 @@ packages: path: "../katana_listenables" relative: true source: path - version: "2.0.1" + version: "2.0.3" katana_listenables_annotation: dependency: "direct overridden" description: path: "../katana_listenables_annotation" relative: true source: path - version: "2.0.1" + version: "2.0.2" katana_localization: dependency: "direct main" description: @@ -359,21 +367,21 @@ packages: path: "../katana_theme" relative: true source: path - version: "2.0.1" + version: "2.0.4" katana_theme_annotation: dependency: "direct overridden" description: path: "../katana_theme_annotation" relative: true source: path - version: "2.0.1" + version: "2.0.2" katana_ui: dependency: "direct main" description: path: "../katana_ui" relative: true source: path - version: "2.0.1" + version: "2.0.2" lints: dependency: transitive description: