Move to Flutter 3.47, use the improvements that come with this (#64)
Reviewed-on: #64
This commit is contained in:
parent
01b13b4764
commit
077044ec19
157 changed files with 1366 additions and 1457 deletions
|
|
@ -1,15 +1,17 @@
|
|||
import "package:flutter/material.dart";
|
||||
import "package:material_ui/material_ui.dart";
|
||||
import "package:freezed_annotation/freezed_annotation.dart";
|
||||
|
||||
part "settings.freezed.dart";
|
||||
part "settings.g.dart";
|
||||
|
||||
@freezed
|
||||
abstract class Settings with _$Settings {
|
||||
const factory Settings({
|
||||
@Default(ThemeMode.system) ThemeMode theme,
|
||||
@Default(true) bool useDynamicTheming,
|
||||
@Default(false) bool linuxMobileMode,
|
||||
}) = _Settings;
|
||||
@Freezed(toJson: false, fromJson: false)
|
||||
@JsonSerializable()
|
||||
class const Settings({
|
||||
final ThemeMode theme = ThemeMode.system,
|
||||
final bool useDynamicTheming = true,
|
||||
final bool linuxMobileMode = false,
|
||||
}) with _$Settings {
|
||||
Map<String, Object?> toJson() => _$SettingsToJson(this);
|
||||
|
||||
factory Settings.fromJson(Map<String, Object?> json) =>
|
||||
_$SettingsFromJson(json);
|
||||
|
|
|
|||
Loading…
Reference in a new issue