Skip to content

Commit

Permalink
Example: update deps (#129)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jupi007 committed Feb 17, 2023
1 parent d4391eb commit 947adac
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 22 deletions.
4 changes: 2 additions & 2 deletions example/lib/src/common/icon_dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class IconDialog extends StatelessWidget {
titlePadding: EdgeInsets.zero,
contentPadding:
const EdgeInsets.symmetric(vertical: _dialogContentPaddingValue),
title: YaruTitleBar(
title: YaruDialogTitleBar(
title: Text(beautifyIconName(iconItem.name)),
),
children: [
Expand Down Expand Up @@ -60,7 +60,7 @@ class IconDialog extends StatelessWidget {
),
Text(
'${size.toInt().toString()}px',
style: Theme.of(context).textTheme.caption,
style: Theme.of(context).textTheme.bodySmall,
),
],
),
Expand Down
2 changes: 1 addition & 1 deletion example/lib/src/common/icon_usage.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class IconUsage extends StatelessWidget {

@override
Widget build(BuildContext context) {
final usageTextStyle = Theme.of(context).textTheme.bodyText1!.copyWith(
final usageTextStyle = Theme.of(context).textTheme.bodyLarge!.copyWith(
fontFamily: 'Monospace',
);

Expand Down
8 changes: 7 additions & 1 deletion example/lib/src/common/search_entry.dart
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,13 @@ class SearchEntry extends StatelessWidget implements PreferredSizeWidget {
},
child: TextField(
decoration: InputDecoration(
border: const UnderlineInputBorder(),
enabledBorder: InputBorder.none,
focusedBorder: UnderlineInputBorder(
borderSide: BorderSide(
color: Theme.of(context).colorScheme.primary,
),
borderRadius: BorderRadius.zero,
),
prefixIcon: const Icon(
YaruIcons.magnifying_glass,
size: 24,
Expand Down
20 changes: 10 additions & 10 deletions example/lib/src/example.dart
Original file line number Diff line number Diff line change
Expand Up @@ -78,30 +78,30 @@ class Example extends StatelessWidget {
)
: null,
),
body: YaruCompactLayout(
body: YaruNavigationPage(
length: 3,
itemBuilder: (context, index, selected) {
const style = YaruNavigationRailStyle.labelled;

switch (index) {
case 0:
return const YaruNavigationRailItem(
icon: Icon(YaruIcons.image),
label: Text('Static icons'),
return YaruNavigationRailItem(
icon: const Icon(YaruIcons.image),
label: const Text('Static icons'),
tooltip: 'Static icons',
style: style,
);
case 1:
return const YaruNavigationRailItem(
icon: Icon(YaruIcons.video),
label: Text('Animated icons'),
return YaruNavigationRailItem(
icon: const Icon(YaruIcons.video),
label: const Text('Animated icons'),
tooltip: 'Animated icons',
style: style,
);
case 2:
return const YaruNavigationRailItem(
icon: Icon(YaruIcons.rule_and_pen),
label: Text('Widget icons'),
return YaruNavigationRailItem(
icon: const Icon(YaruIcons.rule_and_pen),
label: const Text('Widget icons'),
tooltip: 'Widget icons',
style: style,
);
Expand Down
16 changes: 12 additions & 4 deletions example/linux/flutter/generated_plugin_registrant.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,18 @@

#include "generated_plugin_registrant.h"

#include <yaru/yaru_plugin.h>
#include <gtk/gtk_plugin.h>
#include <screen_retriever/screen_retriever_plugin.h>
#include <window_manager/window_manager_plugin.h>

void fl_register_plugins(FlPluginRegistry* registry) {
g_autoptr(FlPluginRegistrar) yaru_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "YaruPlugin");
yaru_plugin_register_with_registrar(yaru_registrar);
g_autoptr(FlPluginRegistrar) gtk_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "GtkPlugin");
gtk_plugin_register_with_registrar(gtk_registrar);
g_autoptr(FlPluginRegistrar) screen_retriever_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "ScreenRetrieverPlugin");
screen_retriever_plugin_register_with_registrar(screen_retriever_registrar);
g_autoptr(FlPluginRegistrar) window_manager_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "WindowManagerPlugin");
window_manager_plugin_register_with_registrar(window_manager_registrar);
}
4 changes: 3 additions & 1 deletion example/linux/flutter/generated_plugins.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
#

list(APPEND FLUTTER_PLUGIN_LIST
yaru
gtk
screen_retriever
window_manager
)

list(APPEND FLUTTER_FFI_PLUGIN_LIST
Expand Down
6 changes: 3 additions & 3 deletions example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ dependencies:
flutter:
sdk: flutter
provider: ^6.0.3
yaru: ^0.4.4
yaru_colors: ^0.1.0
yaru: ^0.5.2
yaru_colors: ^0.1.3
yaru_icons:
path: ../
yaru_widgets: 2.0.0-beta-2
yaru_widgets: ^2.0.1

dependency_overrides:
yaru_icons:
Expand Down

0 comments on commit 947adac

Please sign in to comment.