Skip to content

Commit

Permalink
Bump version to 3.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
prateekmedia committed Sep 29, 2021
1 parent 3ba4bac commit ebbda47
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 35 deletions.
20 changes: 11 additions & 9 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,19 @@ void main() async {
});
}

class MyApp extends StatelessWidget {
class MyApp extends ConsumerWidget {
const MyApp({Key? key}) : super(key: key);

@override
Widget build(BuildContext context) {
return Consumer(builder: (ctx, ref, _) {
return MaterialApp(
debugShowCheckedModeBanner: false,
theme: ref.watch(gnomeThemeProvider.notifier).theme.themeData.copyWith(primaryColor: Colors.blue[600]),
home: const HomePage(),
);
});
Widget build(context, ref) {
return MaterialApp(
debugShowCheckedModeBanner: false,
theme: (ref.watch(forceDarkThemeProvider)
? ref.read(gnomeThemeProvider.notifier).theme.adwaita(true)
: ref.watch(gnomeThemeProvider.notifier).getTheme())
.copyWith(primaryColor: Colors.blue[600]),
home: const HomePage(),
);
}
}

Expand Down Expand Up @@ -354,6 +355,7 @@ class _HomePageState extends State<HomePage> {
children: [
GtkSidebarItem(
gnomeTheme: ref.watch(gnomeThemeProvider.notifier).theme,
selectedColor: context.theme.primaryColor,
label: "Explore",
leading: const AdwaitaIcon(AdwaitaIcons.explore2, size: 17),
),
Expand Down
23 changes: 12 additions & 11 deletions lib/utils/extensions.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,22 @@ extension Context on BuildContext {
back() => Navigator.of(this).pop();
}

extension Iterables<E> on Iterable<E> {
Map<K, List<E>> groupBy<K>(K Function(E) keyFunction) {
Map<K, List<E>> mape(element, map) {
for (var el in (keyFunction(element) as List)) {
map.putIfAbsent(el, () => <E>[]).add(element);
}
return map;
}

return fold(<K, List<E>>{}, (Map<K, List<E>> map, E element) => mape(element, map));
extension CategoryIterable<E> on Iterable<E> {
Map<K, List<E>> groupBy<K>(List<K> Function(E) keyFunction) {
return fold(
{},
(Map<K, List<E>> map, E element) {
for (var el in keyFunction(element)) {
map.putIfAbsent(el, () => <E>[]).add(element);
}
return map;
},
);
}
}

extension UrlLauncher on String {
launchIt() async => await canLaunch(this) ? await launch(this) : throw 'Could not launch $this';
launchIt() async => await launch(this);
}

extension GetHumanizedFileSizeExtension on int {
Expand Down
6 changes: 1 addition & 5 deletions lib/widgets/pool_app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,7 @@ class PoolApp extends HookConsumerWidget {
titlebarSpace: 0,
gnomeTheme: ref.watch(gnomeThemeProvider.notifier).theme,
appWindow: appWindow,
rawDecoratedWindowButton: (name, type, onPressed) => RawDecoratedWindowButton(
name: name,
type: type ?? ThemeType.auto,
onPressed: onPressed,
),
windowDecor: windowDecor,
showMinimize: context.width >= mobileWidth,
showMaximize: context.width >= mobileWidth,
leading: Row(mainAxisSize: MainAxisSize.min, children: [
Expand Down
6 changes: 1 addition & 5 deletions lib/widgets/rounded_dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,7 @@ class RoundedDialog extends HookConsumerWidget {
children: [
GtkHeaderBar(
gnomeTheme: ref.watch(gnomeThemeProvider.notifier).theme,
rawDecoratedWindowButton: (name, type, onPressed) => RawDecoratedWindowButton(
name: name,
type: type ?? ThemeType.auto,
onPressed: onPressed,
),
windowDecor: windowDecor,
onHeaderDrag: appWindow.startDragging,
onDoubleTap: null,
themeType: ref.watch(themeTypeProvider),
Expand Down
4 changes: 2 additions & 2 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ packages:
name: gtk
url: "https://pub.dartlang.org"
source: hosted
version: "0.9.0"
version: "0.9.8+1"
hooks_riverpod:
dependency: "direct main"
description:
Expand Down Expand Up @@ -713,7 +713,7 @@ packages:
name: window_decorations
url: "https://pub.dartlang.org"
source: hosted
version: "0.9.0"
version: "0.9.5"
xdg_directories:
dependency: transitive
description:
Expand Down
6 changes: 3 additions & 3 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: appimagepool
description: A simple, modern AppImageHub Client made for linux using flutter.

version: 3.0.0
version: 3.1.0
publish_to: none

environment:
Expand All @@ -19,7 +19,7 @@ dependencies:
file_picker: ^4.1.2
flutter_spinkit: ^5.1.0
flutter_svg: ^0.22.0
gtk: ^0.9.0
gtk: ^0.9.8+1
hooks_riverpod: ^1.0.0-dev.7
intl: ^0.17.0
package_info_plus: ^1.0.6
Expand All @@ -28,7 +28,7 @@ dependencies:
simple_html_css: ^3.0.1
sticky_headers: ^0.2.0
url_launcher: ^6.0.12
window_decorations: ^0.9.0
window_decorations: ^0.9.5

dev_dependencies:
flutter_test:
Expand Down

0 comments on commit ebbda47

Please sign in to comment.