Skip to content

Commit

Permalink
Update deps, fix memory leak
Browse files Browse the repository at this point in the history
  • Loading branch information
blopker committed Sep 3, 2024
1 parent 4935be9 commit 67e246e
Show file tree
Hide file tree
Showing 5 changed files with 104 additions and 81 deletions.
21 changes: 17 additions & 4 deletions lib/config.freezed.dart
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,12 @@ mixin _$ConfigData {
String get postfix => throw _privateConstructorUsedError;
ThemeMode get themeMode => throw _privateConstructorUsedError;

/// Serializes this ConfigData to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@JsonKey(ignore: true)

/// Create a copy of ConfigData
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$ConfigDataCopyWith<ConfigData> get copyWith =>
throw _privateConstructorUsedError;
}
Expand Down Expand Up @@ -68,6 +72,8 @@ class _$ConfigDataCopyWithImpl<$Res, $Val extends ConfigData>
// ignore: unused_field
final $Res Function($Val) _then;

/// Create a copy of ConfigData
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Expand Down Expand Up @@ -162,6 +168,8 @@ class __$$ConfigDataImplCopyWithImpl<$Res>
_$ConfigDataImpl _value, $Res Function(_$ConfigDataImpl) _then)
: super(_value, _then);

/// Create a copy of ConfigData
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Expand Down Expand Up @@ -311,7 +319,7 @@ class _$ConfigDataImpl implements _ConfigData {
other.themeMode == themeMode));
}

@JsonKey(ignore: true)
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
runtimeType,
Expand All @@ -327,7 +335,9 @@ class _$ConfigDataImpl implements _ConfigData {
postfix,
themeMode);

@JsonKey(ignore: true)
/// Create a copy of ConfigData
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$ConfigDataImplCopyWith<_$ConfigDataImpl> get copyWith =>
Expand Down Expand Up @@ -380,8 +390,11 @@ abstract class _ConfigData implements ConfigData {
String get postfix;
@override
ThemeMode get themeMode;

/// Create a copy of ConfigData
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(ignore: true)
@JsonKey(includeFromJson: false, includeToJson: false)
_$$ConfigDataImplCopyWith<_$ConfigDataImpl> get copyWith =>
throw _privateConstructorUsedError;
}
7 changes: 2 additions & 5 deletions lib/table.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class FilesTable extends StatefulWidget {
State<FilesTable> createState() => _FilesTableState();
}

class _FilesTableState extends State<FilesTable> {
class _FilesTableState extends State<FilesTable> with SignalsMixin {
int? _currentSortColumn;
bool _isSortAsc = true;
List<ImageFile> rows = [];
Expand All @@ -22,14 +22,11 @@ class _FilesTableState extends State<FilesTable> {
void initState() {
debugPrint('initState');
super.initState();
ImageFiles.signal.listen(context, () {
createEffect(() {
setState(() {
rows = [...ImageFiles.signal];
});
});
setState(() {
rows = [...ImageFiles.signal];
});
}

Widget getStatusIcon(ImageFile file) {
Expand Down
2 changes: 1 addition & 1 deletion macos/Runner/AppDelegate.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Cocoa
import FlutterMacOS

@NSApplicationMain
@main
class AppDelegate: FlutterAppDelegate {
override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
return true
Expand Down
Loading

0 comments on commit 67e246e

Please sign in to comment.