レイアウトに必要な値(marginやcolor、固定文言)の管理について #3
Closed
riscait
started this conversation in
Show and tell
Replies: 3 comments 2 replies
-
|
移行ありがとうございます!🙌
|
Beta Was this translation helpful? Give feedback.
1 reply
-
|
final lightTheme = ThemeData.light().copyWith(
elevatedButtonTheme: elevatedButtonTheme,
...
);final darkTheme = ThemeData.dark().copyWith(
elevatedButtonTheme: darkElevatedButtonTheme,
...
); |
Beta Was this translation helpful? Give feedback.
1 reply
-
|
こちら古くなってしまったのでCloseします! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
原案: @naipaka
原案URL:https://github.com/altive/suit-travel/discussions/49 ※プライベートリポジトリのため閲覧制限あり
プライベートリポジトリDiscussionsで開かれた議論だったため、 @riscait が移行し、一部内容を変更して公開しました。
概要
以下の理由から、アプリ全体または複数箇所で使用するレイアウトに必要な値(marginやcolor、固定文言)はWidget等の中で直書きせず、参照した値を使うようにするのはどうでしょうか?
そこで、以下のルールとディレクトリ構成を提案します。
賛成/反対や改善点、追加したい項目、疑問点等あればコメントいただきたいです!
ルール
Theme.Data.textThemeに定義し、Theme.of(context)から使用するディレクトリ構成
例
layout.dart
text_theme.dart
button_theme_data.dart
light_theme_data.dart
dark_theme_data.dart
色々と意見いただけたら幸いです!
Beta Was this translation helpful? Give feedback.
All reactions