Skip to content

Commit a552275

Browse files
committed
Changed to layrz_state library and stable relase
1 parent bd2f39e commit a552275

14 files changed

Lines changed: 38 additions & 35 deletions

File tree

CHANGELOG.md

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

3+
## 7.4.0
4+
5+
- Stable release of 7.4.0 with all the prerelease changes included.
6+
37
## 7.4.0-prerelease10
48

59
- Fixed an issue with the `assert` in `ThemedTable2` that was causing issues when `multiselectActions` is empty and `hasMultiselect` is false.

example/lib/main.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import 'package:layrz_theme/layrz_theme.dart';
77
import 'package:layrz_theme_example/router.dart';
88
import 'package:layrz_theme_example/store/store.dart';
99
import 'package:shared_preferences/shared_preferences.dart';
10-
import 'package:vxstate/vxstate.dart';
10+
import 'package:layrz_state/layrz_state.dart';
1111

1212
const font = AppFont(source: FontSource.google, name: 'Ubuntu');
1313
Future<void> main() async {
@@ -41,7 +41,7 @@ Future<void> main() async {
4141
}
4242

4343
runApp(
44-
VxState(
44+
LayrzState(
4545
store: AppStore(
4646
themeMode: themeMode ?? ThemeMode.system,
4747
mapboxToken: mapboxToken,
@@ -65,11 +65,11 @@ class MyApp extends StatefulWidget {
6565
class _MyAppState extends State<MyApp> {
6666
@override
6767
Widget build(BuildContext context) {
68-
return VxConsumer<AppStore>(
68+
return StateConsumer<AppStore>(
6969
mutations: const {SetColorblindMode, SetColorblindStrength, SetTheme},
7070
notifications: {
7171
SetTheme: (context, mutation, {status}) {
72-
if (status == VxStatus.success) {
72+
if (status == StateStatus.success) {
7373
setState(() {});
7474
WidgetsBinding.instance.addPostFrameCallback((_) {
7575
final mut = mutation as SetTheme;

example/lib/store/store.dart

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ import 'package:layrz_models/layrz_models.dart';
77
import 'package:layrz_theme/layrz_theme.dart';
88
import 'package:shared_preferences/shared_preferences.dart';
99
import 'package:url_launcher/url_launcher_string.dart';
10-
import 'package:vxstate/vxstate.dart';
10+
import 'package:layrz_state/layrz_state.dart';
1111

1212
part 'wrapper.dart';
1313

14-
class AppStore extends VxStore {
14+
class AppStore extends LayrzStore {
1515
ThemeMode themeMode;
1616
ThemedLayoutStyle layoutStyle = ThemedLayoutStyle.mini;
1717
String? mapboxToken;
@@ -65,7 +65,7 @@ class AppStore extends VxStore {
6565
];
6666
}
6767

68-
class SetTheme extends VxMutation<AppStore> {
68+
class SetTheme extends StateMutation<AppStore> {
6969
final ThemeMode themeMode;
7070

7171
SetTheme(this.themeMode);
@@ -79,7 +79,7 @@ class SetTheme extends VxMutation<AppStore> {
7979
}
8080
}
8181

82-
class GetTheme extends VxMutation<AppStore> {
82+
class GetTheme extends StateMutation<AppStore> {
8383
@override
8484
Future<void> perform() async {
8585
final prefs = await SharedPreferences.getInstance();
@@ -93,7 +93,7 @@ class GetTheme extends VxMutation<AppStore> {
9393
}
9494
}
9595

96-
class SetLayout extends VxMutation<AppStore> {
96+
class SetLayout extends StateMutation<AppStore> {
9797
final ThemedLayoutStyle layoutStyle;
9898

9999
SetLayout(this.layoutStyle);
@@ -107,7 +107,7 @@ class SetLayout extends VxMutation<AppStore> {
107107
}
108108
}
109109

110-
class GetLayout extends VxMutation<AppStore> {
110+
class GetLayout extends StateMutation<AppStore> {
111111
@override
112112
Future<void> perform() async {
113113
final prefs = await SharedPreferences.getInstance();
@@ -121,7 +121,7 @@ class GetLayout extends VxMutation<AppStore> {
121121
}
122122
}
123123

124-
class SetColorblindMode extends VxMutation<AppStore> {
124+
class SetColorblindMode extends StateMutation<AppStore> {
125125
final ColorblindMode colorblindMode;
126126

127127
SetColorblindMode(this.colorblindMode);
@@ -135,7 +135,7 @@ class SetColorblindMode extends VxMutation<AppStore> {
135135
}
136136
}
137137

138-
class SetColorblindStrength extends VxMutation<AppStore> {
138+
class SetColorblindStrength extends StateMutation<AppStore> {
139139
final double colorblindStrength;
140140

141141
SetColorblindStrength(this.colorblindStrength);

example/lib/store/wrapper.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class Layout extends StatefulWidget {
1010
}
1111

1212
class _LayoutState extends State<Layout> {
13-
AppStore get store => VxState.store as AppStore;
13+
AppStore get store => LayrzState.store as AppStore;
1414
ThemedLayoutStyle get layoutStyle => store.layoutStyle;
1515

1616
AppThemedAsset get logo => const AppThemedAsset(

example/lib/views/colorblindness.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import 'package:flutter/material.dart';
22
import 'package:layrz_theme/layrz_theme.dart';
33
import 'package:layrz_theme_example/store/store.dart';
4-
import 'package:vxstate/vxstate.dart';
4+
import 'package:layrz_state/layrz_state.dart';
55

66
const kCode = '''
77
return ColorFiltered(
@@ -30,7 +30,7 @@ class ColorblindnessView extends StatefulWidget {
3030
}
3131

3232
class _ColorblindnessViewState extends State<ColorblindnessView> {
33-
AppStore get store => VxState.store as AppStore;
33+
AppStore get store => LayrzState.store as AppStore;
3434

3535
@override
3636
Widget build(BuildContext context) {

example/lib/views/map/map.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ import 'package:flutter_map_animations/flutter_map_animations.dart';
66
import 'package:layrz_models/layrz_models.dart' hide Point;
77
import 'package:layrz_theme/layrz_theme.dart';
88
import 'package:layrz_theme_example/store/store.dart';
9-
import 'package:vxstate/vxstate.dart';
9+
import 'package:layrz_state/layrz_state.dart';
1010

1111
part 'src/layer.dart';

example/lib/views/map/src/layer.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class MapLayerView extends StatefulWidget {
1111

1212
class _MapLayerViewState extends State<MapLayerView> with TickerProviderStateMixin {
1313
late AnimatedMapController _mapController;
14-
AppStore get store => VxState.store as AppStore;
14+
AppStore get store => LayrzState.store as AppStore;
1515
List<MapLayer> get layers => store.availableLayers;
1616
MapLayer? selectedLayer;
1717
final ThemedMapController _controller = ThemedMapController();

example/pubspec.lock

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -360,13 +360,21 @@ packages:
360360
url: "https://pub.dev"
361361
source: hosted
362362
version: "3.4.30"
363+
layrz_state:
364+
dependency: "direct main"
365+
description:
366+
name: layrz_state
367+
sha256: e3c4c433990442b7b9b083293218f7b4be6d7a336cc95016b0225ac5d06dc816
368+
url: "https://pub.dev"
369+
source: hosted
370+
version: "1.0.1+1"
363371
layrz_theme:
364372
dependency: "direct main"
365373
description:
366374
path: ".."
367375
relative: true
368376
source: path
369-
version: "7.4.0-prerelease10"
377+
version: "7.4.0"
370378
leak_tracker:
371379
dependency: transitive
372380
description:
@@ -940,14 +948,6 @@ packages:
940948
url: "https://pub.dev"
941949
source: hosted
942950
version: "15.0.2"
943-
vxstate:
944-
dependency: "direct main"
945-
description:
946-
name: vxstate
947-
sha256: ed5a880018191c5cfed8528bd77f2a942b04847168ca12636a306c323d311086
948-
url: "https://pub.dev"
949-
source: hosted
950-
version: "2.3.0"
951951
web:
952952
dependency: transitive
953953
description:

example/pubspec.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,13 @@ dependencies:
1313

1414
collection: any
1515
go_router: ^12.1.1
16-
vxstate: ^2.3.0
1716
shared_preferences: ^2.2.0
1817
url_launcher: ^6.1.12
1918
flutter_dotenv: ^5.1.0
2019
flutter_map: any
2120
flutter_map_animations: any
21+
22+
layrz_state: any
2223
layrz_icons: any
2324
layrz_models: any
2425
layrz_theme:

lib/src/map/map.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import 'dart:async';
44

55
import 'package:collection/collection.dart';
66
import 'package:dio/dio.dart';
7-
import 'package:flutter/foundation.dart';
87
import 'package:flutter/material.dart';
98
import 'package:flutter_map/flutter_map.dart';
109
import 'package:flutter_map_animations/flutter_map_animations.dart';

0 commit comments

Comments
 (0)