Skip to content

Commit b61c7ba

Browse files
authored
Development (#96)
2 parents 8c9bea2 + de294c4 commit b61c7ba

68 files changed

Lines changed: 898 additions & 719 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.fvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"flutter": "3.32.0",
2+
"flutter": "3.32.1",
33
"flavors": {}
44
}

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Changelog
22

3+
## 7.3.3
4+
- add `isDense` in `ThemedTimePicker`
5+
6+
## 7.3.2
7+
8+
- Added `hidePrefixSuffixActions` prop on `ThemedNumberInput` and removed unused `readonly` prop.
9+
310
## 7.3.1
411

512
- Fixed behavior of `ThemedTextInput` multiple prefixes or suffixes, now will display correctly.

example/lib/main.dart

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -40,17 +40,19 @@ Future<void> main() async {
4040
colorblindMode = ColorblindMode.values.firstWhereOrNull((e) => e.name == rawColorblindMode);
4141
}
4242

43-
runApp(VxState(
44-
store: AppStore(
45-
themeMode: themeMode ?? ThemeMode.system,
46-
mapboxToken: mapboxToken,
47-
googleToken: googleToken,
48-
hereToken: hereToken,
49-
colorblindMode: colorblindMode ?? ColorblindMode.normal,
50-
colorblindStrength: colorblindStrength,
43+
runApp(
44+
VxState(
45+
store: AppStore(
46+
themeMode: themeMode ?? ThemeMode.system,
47+
mapboxToken: mapboxToken,
48+
googleToken: googleToken,
49+
hereToken: hereToken,
50+
colorblindMode: colorblindMode ?? ColorblindMode.normal,
51+
colorblindStrength: colorblindStrength,
52+
),
53+
child: const MyApp(),
5154
),
52-
child: const MyApp(),
53-
));
55+
);
5456
}
5557

5658
class MyApp extends StatefulWidget {

example/lib/store/store.dart

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -30,39 +30,39 @@ class AppStore extends VxStore {
3030
});
3131

3232
List<MapLayer> get availableLayers => [
33-
const MapLayer(
34-
id: 'osm',
35-
name: 'OpenStreetMaps',
36-
source: MapSource.osm,
37-
),
38-
if (mapboxToken != null) ...[
39-
MapLayer(
40-
id: 'mapbox',
41-
name: 'Mapbox Maps',
42-
source: MapSource.mapbox,
43-
mapboxToken: mapboxToken!,
44-
mapboxLayers: MapboxStyle.values,
45-
),
46-
],
47-
if (hereToken != null) ...[
48-
MapLayer(
49-
id: 'here',
50-
name: 'HERE Maps',
51-
source: MapSource.here,
52-
hereToken: hereToken!,
53-
hereLayers: HereStyle.values,
54-
),
55-
],
56-
if (googleToken != null) ...[
57-
MapLayer(
58-
id: 'google',
59-
name: 'Google Maps',
60-
source: MapSource.google,
61-
googleToken: googleToken!,
62-
googleLayers: GoogleMapLayer.values,
63-
),
64-
],
65-
];
33+
const MapLayer(
34+
id: 'osm',
35+
name: 'OpenStreetMaps',
36+
source: MapSource.osm,
37+
),
38+
if (mapboxToken != null) ...[
39+
MapLayer(
40+
id: 'mapbox',
41+
name: 'Mapbox Maps',
42+
source: MapSource.mapbox,
43+
mapboxToken: mapboxToken!,
44+
mapboxLayers: MapboxStyle.values,
45+
),
46+
],
47+
if (hereToken != null) ...[
48+
MapLayer(
49+
id: 'here',
50+
name: 'HERE Maps',
51+
source: MapSource.here,
52+
hereToken: hereToken!,
53+
hereLayers: HereStyle.values,
54+
),
55+
],
56+
if (googleToken != null) ...[
57+
MapLayer(
58+
id: 'google',
59+
name: 'Google Maps',
60+
source: MapSource.google,
61+
googleToken: googleToken!,
62+
googleLayers: GoogleMapLayer.values,
63+
),
64+
],
65+
];
6666
}
6767

6868
class SetTheme extends VxMutation<AppStore> {

example/lib/store/wrapper.dart

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ class _LayoutState extends State<Layout> {
1414
ThemedLayoutStyle get layoutStyle => store.layoutStyle;
1515

1616
AppThemedAsset get logo => const AppThemedAsset(
17-
normal: 'https://cdn.layrz.com/resources/com.layrz.one/logo/normal.svg',
18-
white: 'https://cdn.layrz.com/resources/com.layrz.one/logo/white.svg',
19-
);
17+
normal: 'https://cdn.layrz.com/resources/com.layrz.one/logo/normal.svg',
18+
white: 'https://cdn.layrz.com/resources/com.layrz.one/logo/white.svg',
19+
);
2020

2121
AppThemedAsset get favicon => const AppThemedAsset(
22-
normal: 'https://cdn.layrz.com/resources/com.layrz.one/favicon/normal.svg',
23-
white: 'https://cdn.layrz.com/resources/com.layrz.one/favicon/white.svg',
24-
);
22+
normal: 'https://cdn.layrz.com/resources/com.layrz.one/favicon/normal.svg',
23+
white: 'https://cdn.layrz.com/resources/com.layrz.one/favicon/white.svg',
24+
);
2525

2626
@override
2727
void initState() {

example/lib/views/alerts.dart

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,13 @@ class _AlertsViewState extends State<AlertsView> {
2121
Text(
2222
"Chips and alerts!",
2323
style: Theme.of(context).textTheme.headlineSmall?.copyWith(
24-
fontWeight: FontWeight.bold,
25-
),
24+
fontWeight: FontWeight.bold,
25+
),
2626
),
2727
const SizedBox(height: 10),
2828
ThemedChip(
29-
content: 'This is a chip, displays the content with the provided color, and the background is the same'
29+
content:
30+
'This is a chip, displays the content with the provided color, and the background is the same'
3031
'color with a 10% opacity.',
3132
color: Colors.blue,
3233
),
@@ -72,7 +73,7 @@ class _AlertsViewState extends State<AlertsView> {
7273
),
7374
),
7475
),
75-
]
76+
],
7677
],
7778
);
7879
},

example/lib/views/avatars/src/dynamic.dart

Lines changed: 26 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ class _DynamicAvatarsViewState extends State<DynamicAvatarsView> {
1919
Text(
2020
"What is a dynamic avatar?",
2121
style: Theme.of(context).textTheme.headlineSmall?.copyWith(
22-
fontWeight: FontWeight.bold,
23-
),
22+
fontWeight: FontWeight.bold,
23+
),
2424
),
2525
Text(
2626
"It's similar as the static avatar, but using an model entity (from layrz_models) "
@@ -33,24 +33,25 @@ class _DynamicAvatarsViewState extends State<DynamicAvatarsView> {
3333
Text(
3434
"How to use it?",
3535
style: Theme.of(context).textTheme.headlineSmall?.copyWith(
36-
fontWeight: FontWeight.bold,
37-
),
36+
fontWeight: FontWeight.bold,
37+
),
3838
),
3939
Text(
4040
"Like the static avatar, to generate an avatar, you will use an utility function drawAvatar, "
4141
"here is an example:",
4242
style: Theme.of(context).textTheme.bodyMedium,
4343
),
4444
const ThemedCodeSnippet(
45-
code: "ThemedAvatar(size: 30, dynamicAvatar: Avatar(type: AvatarType.url, "
45+
code:
46+
"ThemedAvatar(size: 30, dynamicAvatar: Avatar(type: AvatarType.url, "
4647
"url: 'https://cdn.layrz.com/resources/layo/layo2.png'))",
4748
),
4849
const SizedBox(height: 10),
4950
Text(
5051
"Result:",
5152
style: Theme.of(context).textTheme.headlineSmall?.copyWith(
52-
fontWeight: FontWeight.bold,
53-
),
53+
fontWeight: FontWeight.bold,
54+
),
5455
),
5556
const SizedBox(height: 10),
5657
const ThemedAvatar(
@@ -65,8 +66,8 @@ class _DynamicAvatarsViewState extends State<DynamicAvatarsView> {
6566
Text(
6667
"Look at this examples:",
6768
style: Theme.of(context).textTheme.bodyLarge?.copyWith(
68-
fontWeight: FontWeight.bold,
69-
),
69+
fontWeight: FontWeight.bold,
70+
),
7071
),
7172
Text(
7273
"Our functions offers inline documentation, so you can see all the arguments and their types.",
@@ -79,15 +80,17 @@ class _DynamicAvatarsViewState extends State<DynamicAvatarsView> {
7980
children: [
8081
_buildExampleRow(
8182
avatar: const Avatar(type: AvatarType.none),
82-
codeExample: "ThemedAvatar(size: 30, name: 'Example', "
83+
codeExample:
84+
"ThemedAvatar(size: 30, name: 'Example', "
8385
"dynamicAvatar: const Avatar(type: AvatarType.none))",
8486
),
8587
const SizedBox(height: 5),
8688
const Divider(),
8789
const SizedBox(height: 5),
8890
_buildExampleRow(
8991
avatar: const Avatar(type: AvatarType.url, url: 'https://cdn.layrz.com/resources/layo/layo2.png'),
90-
codeExample: "ThemedAvatar(size: 30, name: 'Example', dynamicAvatar: "
92+
codeExample:
93+
"ThemedAvatar(size: 30, name: 'Example', dynamicAvatar: "
9194
"const Avatar(type: AvatarType.url, url: 'https://cdn.layrz.com/resources/layo/"
9295
"layo2.png'))",
9396
),
@@ -96,15 +99,17 @@ class _DynamicAvatarsViewState extends State<DynamicAvatarsView> {
9699
const SizedBox(height: 5),
97100
_buildExampleRow(
98101
avatar: Avatar(type: AvatarType.icon, icon: LayrzIconsClasses.mdiClipboard),
99-
codeExample: "ThemedAvatar(size: 30, name: 'Example', dynamicAvatar: "
102+
codeExample:
103+
"ThemedAvatar(size: 30, name: 'Example', dynamicAvatar: "
100104
"Avatar(type: AvatarType.icon, icon: LayrzIconsClasses.mdiClipboard))",
101105
),
102106
const SizedBox(height: 5),
103107
const Divider(),
104108
const SizedBox(height: 5),
105109
_buildExampleRow(
106110
avatar: const Avatar(type: AvatarType.emoji, emoji: '👍'),
107-
codeExample: "ThemedAvatar(size: 30, name: 'Example', dynamicAvatar: "
111+
codeExample:
112+
"ThemedAvatar(size: 30, name: 'Example', dynamicAvatar: "
108113
"const Avatar(type: AvatarType.emoji, emoji: '👍'))",
109114
),
110115
],
@@ -144,13 +149,15 @@ class _DynamicAvatarsViewState extends State<DynamicAvatarsView> {
144149
labelText: "Get the code",
145150
onTap: () {
146151
Clipboard.setData(ClipboardData(text: codeExample));
147-
ThemedSnackbarMessenger.of(context).showSnackbar(ThemedSnackbar(
148-
message: "Copied to clipboard",
149-
icon: LayrzIcons.mdiClipboardCheckOutline,
150-
color: Colors.green,
151-
));
152+
ThemedSnackbarMessenger.of(context).showSnackbar(
153+
ThemedSnackbar(
154+
message: "Copied to clipboard",
155+
icon: LayrzIcons.mdiClipboardCheckOutline,
156+
color: Colors.green,
157+
),
158+
);
152159
},
153-
)
160+
),
154161
],
155162
);
156163
}

example/lib/views/avatars/src/static.dart

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ class _StaticAvatarsViewState extends State<StaticAvatarsView> {
1919
Text(
2020
"What is a static avatar?",
2121
style: Theme.of(context).textTheme.headlineSmall?.copyWith(
22-
fontWeight: FontWeight.bold,
23-
),
22+
fontWeight: FontWeight.bold,
23+
),
2424
),
2525
Text(
2626
"It's simple, avatars using static images or icons are static avatars (In the Layrz philosophy).",
@@ -30,8 +30,8 @@ class _StaticAvatarsViewState extends State<StaticAvatarsView> {
3030
Text(
3131
"How to use it?",
3232
style: Theme.of(context).textTheme.headlineSmall?.copyWith(
33-
fontWeight: FontWeight.bold,
34-
),
33+
fontWeight: FontWeight.bold,
34+
),
3535
),
3636
Text(
3737
"To generate an avatar, you will use an utility function drawAvatar, here is an example:",
@@ -44,8 +44,8 @@ class _StaticAvatarsViewState extends State<StaticAvatarsView> {
4444
Text(
4545
"Result:",
4646
style: Theme.of(context).textTheme.headlineSmall?.copyWith(
47-
fontWeight: FontWeight.bold,
48-
),
47+
fontWeight: FontWeight.bold,
48+
),
4949
),
5050
const SizedBox(height: 10),
5151
const ThemedAvatar(size: 30),
@@ -61,17 +61,17 @@ class _StaticAvatarsViewState extends State<StaticAvatarsView> {
6161
Text(
6262
"Result:",
6363
style: Theme.of(context).textTheme.headlineSmall?.copyWith(
64-
fontWeight: FontWeight.bold,
65-
),
64+
fontWeight: FontWeight.bold,
65+
),
6666
),
6767
const SizedBox(height: 10),
6868
const ThemedAvatar(size: 30, color: Colors.red),
6969
const SizedBox(height: 10),
7070
Text(
7171
"Look this other examples:",
7272
style: Theme.of(context).textTheme.bodyLarge?.copyWith(
73-
fontWeight: FontWeight.bold,
74-
),
73+
fontWeight: FontWeight.bold,
74+
),
7575
),
7676
Text(
7777
"Our functions offers inline documentation, so you can see all the arguments and their types.",
@@ -85,7 +85,8 @@ class _StaticAvatarsViewState extends State<StaticAvatarsView> {
8585
_buildExampleRow(
8686
name: 'Using an image',
8787
avatar: 'https://cdn.layrz.com/resources/layo/layo2.png',
88-
codeExample: "ThemedAvatar(size: 50, avatar: "
88+
codeExample:
89+
"ThemedAvatar(size: 50, avatar: "
8990
"'https://cdn.layrz.com/resources/layo/layo2.png')",
9091
),
9192
const SizedBox(height: 5),
@@ -105,7 +106,8 @@ class _StaticAvatarsViewState extends State<StaticAvatarsView> {
105106
avatar: 'https://cdn.layrz.com/resources/layo/layo2.png',
106107
radius: 10,
107108
elevation: 3,
108-
codeExample: "ThemedAvatar(size: 50, avatar: "
109+
codeExample:
110+
"ThemedAvatar(size: 50, avatar: "
109111
"'https://cdn.layrz.com/resources/layo/layo2.png', radius: 10, elevation: 3)",
110112
),
111113
],
@@ -154,13 +156,15 @@ class _StaticAvatarsViewState extends State<StaticAvatarsView> {
154156
labelText: "Get the code",
155157
onTap: () {
156158
Clipboard.setData(ClipboardData(text: codeExample));
157-
ThemedSnackbarMessenger.of(context).showSnackbar(ThemedSnackbar(
158-
message: "Copied to clipboard",
159-
icon: LayrzIcons.mdiClipboardCheckOutline,
160-
color: Colors.green,
161-
));
159+
ThemedSnackbarMessenger.of(context).showSnackbar(
160+
ThemedSnackbar(
161+
message: "Copied to clipboard",
162+
icon: LayrzIcons.mdiClipboardCheckOutline,
163+
color: Colors.green,
164+
),
165+
);
162166
},
163-
)
167+
),
164168
],
165169
);
166170
}

0 commit comments

Comments
 (0)