diff --git a/forui/lib/src/foundation/platform.dart b/forui/lib/src/foundation/platform.dart index de2c7cd23..337085b98 100644 --- a/forui/lib/src/foundation/platform.dart +++ b/forui/lib/src/foundation/platform.dart @@ -1,6 +1,8 @@ import 'package:flutter/foundation.dart'; + import 'package:meta/meta.dart'; @internal + /// The platforms that are primarily touch enabled. It isn't 100% accurate but it is a good approximation. -const touchPlatforms = { TargetPlatform.android, TargetPlatform.iOS, TargetPlatform.fuchsia }; +const touchPlatforms = {TargetPlatform.android, TargetPlatform.iOS, TargetPlatform.fuchsia}; diff --git a/forui/lib/src/theme/theme.dart b/forui/lib/src/theme/theme.dart index 9e157fac3..784fd00a4 100644 --- a/forui/lib/src/theme/theme.dart +++ b/forui/lib/src/theme/theme.dart @@ -103,25 +103,28 @@ class FTheme extends StatelessWidget { data: data, child: Directionality( textDirection: textDirection ?? Directionality.of(context), - child: Overlay.maybeOf(context) == null ? Overlay( // TODO: temporary until we create FApp. - initialEntries: [ - OverlayEntry( - builder: (context) => DefaultTextStyle( + child: Overlay.maybeOf(context) == null + ? Overlay( + // TODO: temporary until we create FApp. + initialEntries: [ + OverlayEntry( + builder: (context) => DefaultTextStyle( + style: data.typography.base.copyWith( + fontFamily: data.typography.defaultFontFamily, + color: data.colorScheme.foreground, + ), + child: child, + ), + ), + ], + ) + : DefaultTextStyle( style: data.typography.base.copyWith( fontFamily: data.typography.defaultFontFamily, color: data.colorScheme.foreground, ), child: child, ), - ), - ], - ) : DefaultTextStyle( - style: data.typography.base.copyWith( - fontFamily: data.typography.defaultFontFamily, - color: data.colorScheme.foreground, - ), - child: child, - ), ), ); diff --git a/forui/lib/src/widgets/popover.dart b/forui/lib/src/widgets/popover.dart index de26502bb..939341ef4 100644 --- a/forui/lib/src/widgets/popover.dart +++ b/forui/lib/src/widgets/popover.dart @@ -1,11 +1,11 @@ import 'package:flutter/foundation.dart'; import 'package:flutter/services.dart'; import 'package:flutter/widgets.dart'; -import 'package:forui/src/foundation/platform.dart'; import 'package:meta/meta.dart'; import 'package:forui/forui.dart'; +import 'package:forui/src/foundation/platform.dart'; /// A controller that controls whether a [FPopover] is shown or hidden. final class FPopoverController extends ChangeNotifier { diff --git a/forui/lib/src/widgets/resizable/resizable.dart b/forui/lib/src/widgets/resizable/resizable.dart index 15b9d39dd..41b924ec2 100644 --- a/forui/lib/src/widgets/resizable/resizable.dart +++ b/forui/lib/src/widgets/resizable/resizable.dart @@ -1,11 +1,11 @@ import 'package:flutter/foundation.dart'; import 'package:flutter/widgets.dart'; -import 'package:forui/src/foundation/platform.dart'; import 'package:meta/meta.dart'; import 'package:sugar/sugar.dart'; import 'package:forui/forui.dart'; +import 'package:forui/src/foundation/platform.dart'; import 'package:forui/src/widgets/resizable/divider.dart'; /// A resizable allows its children to be resized along either the horizontal or vertical main axis. diff --git a/forui/lib/src/widgets/tabs/tabs.dart b/forui/lib/src/widgets/tabs/tabs.dart index ba2e9769d..3708255b2 100644 --- a/forui/lib/src/widgets/tabs/tabs.dart +++ b/forui/lib/src/widgets/tabs/tabs.dart @@ -108,11 +108,12 @@ class _FTabsState extends State with SingleTickerProviderStateMixin { @override void initState() { super.initState(); - _controller = widget.controller ?? FTabController( - initialIndex: widget.initialIndex, - length: widget.tabs.length, - vsync: this, - ); + _controller = widget.controller ?? + FTabController( + initialIndex: widget.initialIndex, + length: widget.tabs.length, + vsync: this, + ); } @override @@ -123,11 +124,12 @@ class _FTabsState extends State with SingleTickerProviderStateMixin { _controller.dispose(); } - _controller = widget.controller ?? FTabController( - initialIndex: widget.initialIndex, - length: widget.tabs.length, - vsync: this, - ); + _controller = widget.controller ?? + FTabController( + initialIndex: widget.initialIndex, + length: widget.tabs.length, + vsync: this, + ); } } diff --git a/forui/lib/src/widgets/tooltip.dart b/forui/lib/src/widgets/tooltip.dart index 7efa653a6..bf9054d49 100644 --- a/forui/lib/src/widgets/tooltip.dart +++ b/forui/lib/src/widgets/tooltip.dart @@ -1,9 +1,11 @@ import 'package:flutter/foundation.dart'; import 'package:flutter/services.dart'; import 'package:flutter/widgets.dart'; + +import 'package:meta/meta.dart'; + import 'package:forui/forui.dart'; import 'package:forui/src/foundation/platform.dart'; -import 'package:meta/meta.dart'; /// A controller that controls whether a [FPopover] is shown or hidden. final class FTooltipController extends ChangeNotifier { diff --git a/forui/test/src/widgets/tooltip/tooltip_golden_test.dart b/forui/test/src/widgets/tooltip/tooltip_golden_test.dart index 5b5a130db..46ded9f59 100644 --- a/forui/test/src/widgets/tooltip/tooltip_golden_test.dart +++ b/forui/test/src/widgets/tooltip/tooltip_golden_test.dart @@ -61,4 +61,4 @@ void main() { }); }); } -} \ No newline at end of file +}