Skip to content

Commit

Permalink
Bump version to 1.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
prateekmedia committed May 14, 2022
1 parent 73293ad commit c1752a9
Show file tree
Hide file tree
Showing 10 changed files with 54 additions and 47 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Changelog

## 1.2.0-dev
## 1.2.0

### BREAKING

Expand Down Expand Up @@ -70,6 +70,8 @@
* Init Translations

### CHANGED
* Remove null checks from WidgetsBinding (Flutter 3.0.0)
* Changed launch to launchUrl for url_launcher package
* Changed default value of `horizontalTitleGap` to 8
* Switch to `titlebar_buttons` package as `window_decorations` is deprecated
* Link to external examples in example.md
Expand Down
5 changes: 3 additions & 2 deletions example/lib/home_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,9 @@ class _MyHomePageState extends State<MyHomePage> {
.map(
(e) => AdwActionRow(
title: e.key,
onActivated: () =>
launch('https://github.com/${e.value}'),
onActivated: () => launchUrl(
Uri.parse('https://github.com/${e.value}'),
),
),
)
.toList(),
Expand Down
60 changes: 30 additions & 30 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ packages:
name: args
url: "https://pub.dartlang.org"
source: hosted
version: "2.3.0"
version: "2.3.1"
async:
dependency: transitive
description:
Expand Down Expand Up @@ -90,35 +90,35 @@ packages:
name: collection
url: "https://pub.dartlang.org"
source: hosted
version: "1.15.0"
version: "1.16.0"
dbus:
dependency: transitive
description:
name: dbus
url: "https://pub.dartlang.org"
source: hosted
version: "0.7.1"
version: "0.7.3"
desktop_multi_window:
dependency: "direct main"
description:
name: desktop_multi_window
url: "https://pub.dartlang.org"
source: hosted
version: "0.0.1"
version: "0.0.2"
fake_async:
dependency: transitive
description:
name: fake_async
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0"
version: "1.3.0"
ffi:
dependency: transitive
description:
name: ffi
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.2"
version: "1.2.1"
file:
dependency: transitive
description:
Expand Down Expand Up @@ -182,7 +182,7 @@ packages:
path: ".."
relative: true
source: path
version: "1.2.0-dev"
version: "1.2.0"
libadwaita_bitsdojo:
dependency: "direct main"
description:
Expand Down Expand Up @@ -210,7 +210,7 @@ packages:
name: material_color_utilities
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.3"
version: "0.1.4"
meta:
dependency: transitive
description:
Expand All @@ -224,14 +224,14 @@ packages:
name: package_info_plus
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0"
version: "1.4.2"
package_info_plus_linux:
dependency: transitive
description:
name: package_info_plus_linux
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.3"
version: "1.0.5"
package_info_plus_macos:
dependency: transitive
description:
Expand All @@ -252,14 +252,14 @@ packages:
name: package_info_plus_web
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.4"
version: "1.0.5"
package_info_plus_windows:
dependency: transitive
description:
name: package_info_plus_windows
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.4"
version: "1.0.5"
path:
dependency: transitive
description:
Expand Down Expand Up @@ -287,7 +287,7 @@ packages:
name: petitparser
url: "https://pub.dartlang.org"
source: hosted
version: "4.4.0"
version: "5.0.0"
platform:
dependency: transitive
description:
Expand All @@ -301,7 +301,7 @@ packages:
name: plugin_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.2"
version: "2.1.2"
popover_gtk:
dependency: transitive
description:
Expand All @@ -327,7 +327,7 @@ packages:
name: source_span
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.1"
version: "1.8.2"
stack_trace:
dependency: transitive
description:
Expand Down Expand Up @@ -369,70 +369,70 @@ packages:
name: typed_data
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0"
version: "1.3.1"
url_launcher:
dependency: transitive
description:
name: url_launcher
url: "https://pub.dartlang.org"
source: hosted
version: "6.0.18"
version: "6.1.2"
url_launcher_android:
dependency: transitive
description:
name: url_launcher_android
url: "https://pub.dartlang.org"
source: hosted
version: "6.0.14"
version: "6.0.17"
url_launcher_ios:
dependency: transitive
description:
name: url_launcher_ios
url: "https://pub.dartlang.org"
source: hosted
version: "6.0.14"
version: "6.0.16"
url_launcher_linux:
dependency: transitive
description:
name: url_launcher_linux
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.3"
version: "3.0.1"
url_launcher_macos:
dependency: transitive
description:
name: url_launcher_macos
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.3"
version: "3.0.1"
url_launcher_platform_interface:
dependency: transitive
description:
name: url_launcher_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.4"
version: "2.0.5"
url_launcher_web:
dependency: transitive
description:
name: url_launcher_web
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.6"
version: "2.0.11"
url_launcher_windows:
dependency: transitive
description:
name: url_launcher_windows
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.2"
version: "3.0.1"
vector_math:
dependency: transitive
description:
name: vector_math
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.1"
version: "2.1.2"
very_good_analysis:
dependency: "direct dev"
description:
Expand All @@ -446,21 +446,21 @@ packages:
name: win32
url: "https://pub.dartlang.org"
source: hosted
version: "2.3.3"
version: "2.5.2"
xdg_directories:
dependency: transitive
description:
name: xdg_directories
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.0"
version: "0.2.0+1"
xml:
dependency: transitive
description:
name: xml
url: "https://pub.dartlang.org"
source: hosted
version: "5.3.1"
version: "5.4.1"
sdks:
dart: ">=2.16.0-100.0.dev <3.0.0"
flutter: ">=2.5.0"
dart: ">=2.17.0-0 <3.0.0"
flutter: ">=2.10.0"
8 changes: 4 additions & 4 deletions lib/src/internal/window_resize_listener.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ class _WindowResizeListenerState extends State<WindowResizeListener>

@override
void initState() {
_lastSize = WidgetsBinding.instance!.window.physicalSize;
WidgetsBinding.instance!.addObserver(this);
_lastSize = WidgetsBinding.instance.window.physicalSize;
WidgetsBinding.instance.addObserver(this);

widget.onResize(_lastSize);

Expand All @@ -30,13 +30,13 @@ class _WindowResizeListenerState extends State<WindowResizeListener>

@override
void dispose() {
WidgetsBinding.instance!.removeObserver(this);
WidgetsBinding.instance.removeObserver(this);
super.dispose();
}

@override
void didChangeMetrics() {
final winSize = WidgetsBinding.instance!.window.physicalSize;
final winSize = WidgetsBinding.instance.window.physicalSize;

if (winSize != _lastSize) {
widget.onResize(winSize);
Expand Down
4 changes: 2 additions & 2 deletions lib/src/widgets/adw/about_window.dart
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,8 @@ class _AdwAboutWindowState extends State<AdwAboutWindow> {
if (widget.issueTrackerLink != null)
AdwActionRow(
title: 'Report an issue',
onActivated: () => launch(
widget.issueTrackerLink!,
onActivated: () => launchUrl(
Uri.parse(widget.issueTrackerLink!),
),
end: widget.launchEndIcon ??
const Icon(
Expand Down
3 changes: 2 additions & 1 deletion lib/src/widgets/adw/flap.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import 'package:libadwaita/src/internal/window_resize_listener.dart';
import 'package:libadwaita/src/utils/colors.dart';

enum FoldPolicy { never, always, auto }

enum FlapPosition { start, end }

class FlapOptions {
Expand Down Expand Up @@ -153,7 +154,7 @@ class _AdwFlapState extends State<AdwFlap> {

return WindowResizeListener(
onResize: (Size size) =>
WidgetsBinding.instance!.addPostFrameCallback((_) {
WidgetsBinding.instance.addPostFrameCallback((_) {
// The stuff that happens when the window is resized
// We check for the mobile state and update it on every resize
// Do nothin if FoldPolicy is never / always, because they are not
Expand Down
2 changes: 1 addition & 1 deletion lib/src/widgets/adw/header_bar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ class _AdwHeaderBarState extends State<AdwHeaderBar> {

final schema = GSettings('org.gnome.desktop.wm.preferences');

WidgetsBinding.instance?.addPostFrameCallback((_) async {
WidgetsBinding.instance.addPostFrameCallback((_) async {
final buttonLayout = await schema.get('button-layout') as DBusString?;
if (buttonLayout != null) {
updateSep(buttonLayout.value);
Expand Down
4 changes: 2 additions & 2 deletions lib/src/widgets/gtk/stack_sidebar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class _GtkStackSidebarState extends State<GtkStackSidebar> {
Future<void> loadContentPage(BuildContext context) async {
if (_popupNotOpen) {
_popupNotOpen = false;
SchedulerBinding.instance!.addPostFrameCallback((_) async {
SchedulerBinding.instance.addPostFrameCallback((_) async {
final child = Scaffold(
body: widget.fullContentBuilder != null
? widget.fullContentBuilder!(
Expand Down Expand Up @@ -87,7 +87,7 @@ class _GtkStackSidebarState extends State<GtkStackSidebar> {
/// closes popup wind
void _closePopup() {
if (!_popupNotOpen) {
SchedulerBinding.instance!
SchedulerBinding.instance
.addPostFrameCallback((_) => Navigator.pop(context));
}
}
Expand Down
3 changes: 3 additions & 0 deletions lib/src/widgets/gtk/toggle_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,11 @@ class GtkToggleButton extends StatelessWidget {
required this.isSelected,
}) : super(key: key);

/// The List of all the children widgets of this toggle button
final List<Widget> children;

final void Function(int index) onPressed;

final List<bool> isSelected;

@override
Expand Down
8 changes: 4 additions & 4 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: libadwaita
description: Libadwaita's widgets for Flutter. Following Gnome HIG and available on all platforms.
version: 1.2.0-dev
version: 1.2.0
homepage: https://github.com/gtk-flutter/libadwaita

environment:
Expand All @@ -16,15 +16,15 @@ platforms:
windows:

dependencies:
dbus: ">=0.7.1 <1.0.0"
dbus: ">=0.7.3 <1.0.0"
flutter:
sdk: flutter
flutter_svg: ">=1.0.3 < 2.0.0"
gsettings: ">=0.2.5 <1.0.0"
libadwaita_core: ">=0.5.1 < 2.0.0"
package_info_plus: ">=1.3.0 < 2.0.0"
package_info_plus: ">=1.4.2 < 2.0.0"
popover_gtk: ">=0.2.6+3 < 1.0.0"
url_launcher: ">=6.0.18 < 7.0.0"
url_launcher: ">=6.1.2 < 7.0.0"

dev_dependencies:
very_good_analysis: ^2.4.0
Expand Down

0 comments on commit c1752a9

Please sign in to comment.