Skip to content

Commit

Permalink
Upgrade to 3.27
Browse files Browse the repository at this point in the history
  • Loading branch information
Pante committed Dec 12, 2024
1 parent dd3585b commit 3d2696f
Show file tree
Hide file tree
Showing 15 changed files with 25 additions and 76 deletions.
6 changes: 6 additions & 0 deletions .flutter-plugins
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# This is a generated file; do not edit or check into version control.
path_provider=/Users/matthias/.pub-cache/hosted/pub.dev/path_provider-2.1.5/
path_provider_android=/Users/matthias/.pub-cache/hosted/pub.dev/path_provider_android-2.2.15/
path_provider_foundation=/Users/matthias/.pub-cache/hosted/pub.dev/path_provider_foundation-2.4.1/
path_provider_linux=/Users/matthias/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/
path_provider_windows=/Users/matthias/.pub-cache/hosted/pub.dev/path_provider_windows-2.3.0/
1 change: 1 addition & 0 deletions .flutter-plugins-dependencies
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"path_provider_foundation","path":"/Users/matthias/.pub-cache/hosted/pub.dev/path_provider_foundation-2.4.1/","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"android":[{"name":"path_provider_android","path":"/Users/matthias/.pub-cache/hosted/pub.dev/path_provider_android-2.2.15/","native_build":true,"dependencies":[]}],"macos":[{"name":"path_provider_foundation","path":"/Users/matthias/.pub-cache/hosted/pub.dev/path_provider_foundation-2.4.1/","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"/Users/matthias/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/","native_build":false,"dependencies":[]}],"windows":[{"name":"path_provider_windows","path":"/Users/matthias/.pub-cache/hosted/pub.dev/path_provider_windows-2.3.0/","native_build":false,"dependencies":[]}],"web":[]},"dependencyGraph":[{"name":"path_provider","dependencies":["path_provider_android","path_provider_foundation","path_provider_linux","path_provider_windows"]},{"name":"path_provider_android","dependencies":[]},{"name":"path_provider_foundation","dependencies":[]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]}],"date_created":"2024-12-12 11:12:38.176563","version":"3.27.0","swift_package_manager_enabled":false}
1 change: 0 additions & 1 deletion forui/example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ android {
}

defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.foruslabs.forui.example"
// You can update the following values to match your application needs.
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
Expand Down
47 changes: 0 additions & 47 deletions forui/lib/src/foundation/util.dart

This file was deleted.

4 changes: 2 additions & 2 deletions forui/lib/src/theme/color_scheme.dart
Original file line number Diff line number Diff line change
Expand Up @@ -142,15 +142,15 @@ final class FColorScheme with Diagnosticable {
///
/// [FColorScheme.background] is used if [background] is not given.
Color hover(Color foreground, [Color? background]) => Color.alphaBlend(
foreground.withOpacity(enabledHoveredOpacity),
foreground.withValues(alpha: enabledHoveredOpacity),
background ?? this.background,
);

/// Returns a disabled color for the [foreground] on the [background].
///
/// [FColorScheme.background] is used if [background] is not given.
Color disable(Color foreground, [Color? background]) => Color.alphaBlend(
foreground.withOpacity(disabledOpacity),
foreground.withValues(alpha: disabledOpacity),
background ?? this.background,
);

Expand Down
4 changes: 1 addition & 3 deletions forui/lib/src/widgets/accordion/accordion_item.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import 'package:flutter/rendering.dart';
import 'package:flutter/widgets.dart';

import 'package:forui/forui.dart';
import 'package:forui/src/foundation/util.dart';
import 'package:forui/src/widgets/accordion/accordion.dart';

/// An interactive heading that reveals a section of content.
Expand Down Expand Up @@ -124,8 +123,7 @@ class _FAccordionItemState extends State<FAccordionItem> with TickerProviderStat
child: Row(
children: [
Expanded(
child: merge(
// TODO: replace with DefaultTextStyle.merge when textHeightBehavior has been added.
child: DefaultTextStyle.merge(
textHeightBehavior: const TextHeightBehavior(
applyHeightToFirstAscent: false,
applyHeightToLastDescent: false,
Expand Down
7 changes: 2 additions & 5 deletions forui/lib/src/widgets/card/card_content.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import 'package:flutter/widgets.dart';
import 'package:meta/meta.dart';

import 'package:forui/forui.dart';
import 'package:forui/src/foundation/util.dart';

@internal
class Content extends StatelessWidget {
Expand Down Expand Up @@ -39,8 +38,7 @@ class Content extends StatelessWidget {
),
if ((title != null || subtitle != null || child != null) && image != null) const SizedBox(height: 10),
if (title != null)
// TODO: replace with DefaultTextStyle.merge when textHeightBehavior has been added.
merge(
DefaultTextStyle.merge(
textHeightBehavior: const TextHeightBehavior(
applyHeightToFirstAscent: false,
applyHeightToLastDescent: false,
Expand All @@ -49,8 +47,7 @@ class Content extends StatelessWidget {
child: title!,
),
if (subtitle != null)
// TODO: replace with DefaultTextStyle.merge when textHeightBehavior has been added.
merge(
DefaultTextStyle.merge(
textHeightBehavior: const TextHeightBehavior(
applyHeightToFirstAscent: false,
applyHeightToLastDescent: false,
Expand Down
2 changes: 1 addition & 1 deletion forui/lib/src/widgets/header/nested_header.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ part of 'header.dart';
/// * https://forui.dev/docs/navigation/header for working examples.
/// * [FNestedHeaderStyle] for customizing a header's appearance.
final class _FNestedHeader extends FHeader {
/// The style. Defaults to [FThemeData.headerStyle.nestedStyle].
/// The style.
final FNestedHeaderStyle? style;

/// The title, aligned to the center.
Expand Down
2 changes: 1 addition & 1 deletion forui/lib/src/widgets/header/root_header.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ part of 'header.dart';
/// * https://forui.dev/docs/navigation/header for working examples.
/// * [FRootHeaderStyle] for customizing a header's appearance.
final class _FRootHeader extends FHeader {
/// The header's style. Defaults to [FThemeData.headerStyle.rootStyle].
/// The header's style.
final FRootHeaderStyle? style;

/// The title, aligned to the left in LTR locales.
Expand Down
7 changes: 2 additions & 5 deletions forui/lib/src/widgets/line_calendar/line_calendar_item.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import 'package:flutter/widgets.dart';
import 'package:meta/meta.dart';

import 'package:forui/forui.dart';
import 'package:forui/src/foundation/util.dart';

/// The state of a line calendar item used to build a line calendar item.
typedef FLineCalendarItemData = ({
Expand Down Expand Up @@ -134,8 +133,7 @@ class ItemContent extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.center,
mainAxisSize: MainAxisSize.min,
children: [
// TODO: replace with DefaultTextStyle.merge when textHeightBehavior has been added.
merge(
DefaultTextStyle.merge(
textHeightBehavior: const TextHeightBehavior(
applyHeightToFirstAscent: false,
applyHeightToLastDescent: false,
Expand All @@ -144,8 +142,7 @@ class ItemContent extends StatelessWidget {
child: Text(localizations.day(date)),
),
SizedBox(height: style.itemContentSpacing),
// TODO: replace with DefaultTextStyle.merge when textHeightBehavior has been added.
merge(
DefaultTextStyle.merge(
textHeightBehavior: const TextHeightBehavior(
applyHeightToFirstAscent: false,
applyHeightToLastDescent: false,
Expand Down
4 changes: 2 additions & 2 deletions forui/lib/src/widgets/sheet/modal_sheet.dart
Original file line number Diff line number Diff line change
Expand Up @@ -241,11 +241,11 @@ class FModalSheetRoute<T> extends PopupRoute<T> {

@override
Widget buildModalBarrier() {
if (barrierColor.alpha != 0 && !offstage) {
if (barrierColor.a != 0 && !offstage) {
// changedInternalState is called if barrierColor or offstage updates
final color = animation!.drive(
ColorTween(
begin: barrierColor.withOpacity(0.0),
begin: barrierColor.withValues(alpha: 0.0),
end: barrierColor, // changedInternalState is called if barrierColor updates
).chain(CurveTween(curve: barrierCurve)), // changedInternalState is called if barrierCurve updates
);
Expand Down
4 changes: 2 additions & 2 deletions forui/lib/src/widgets/switch.dart
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,8 @@ class FSwitch extends StatelessWidget {
onChange?.call(value);
},
applyTheme: false,
activeColor: switchStyle.checkedColor,
trackColor: switchStyle.uncheckedColor,
activeTrackColor: switchStyle.checkedColor,
inactiveTrackColor: switchStyle.uncheckedColor,
thumbColor: switchStyle.thumbColor,
focusColor: style.focusColor,
autofocus: autofocus,
Expand Down
2 changes: 1 addition & 1 deletion forui/lib/src/widgets/text_field/text_field.dart
Original file line number Diff line number Diff line change
Expand Up @@ -767,7 +767,7 @@ final class FTextField extends StatelessWidget {
data: Theme.of(context).copyWith(
textSelectionTheme: TextSelectionThemeData(
cursorColor: style.cursorColor,
selectionColor: style.cursorColor.withOpacity(0.4),
selectionColor: style.cursorColor.withValues(alpha: 0.4),
selectionHandleColor: style.cursorColor,
),
cupertinoOverrideTheme: CupertinoThemeData(
Expand Down
7 changes: 3 additions & 4 deletions forui/lib/src/widgets/tile/tile_content.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import 'package:flutter/widgets.dart';
import 'package:meta/meta.dart';

import 'package:forui/forui.dart';
import 'package:forui/src/foundation/util.dart';
import 'package:forui/src/widgets/tile/tile_group.dart';
import 'package:forui/src/widgets/tile/tile_render_object.dart';

Expand Down Expand Up @@ -74,7 +73,7 @@ class FTileContent extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
merge(
DefaultTextStyle.merge(
style: style.titleTextStyle,
textHeightBehavior: const TextHeightBehavior(
applyHeightToFirstAscent: false,
Expand All @@ -86,7 +85,7 @@ class FTileContent extends StatelessWidget {
if (subtitle case final subtitle?)
Padding(
padding: EdgeInsets.only(top: contentStyle.titleSpacing),
child: merge(
child: DefaultTextStyle.merge(
style: style.subtitleTextStyle,
textHeightBehavior: const TextHeightBehavior(
applyHeightToFirstAscent: false,
Expand All @@ -100,7 +99,7 @@ class FTileContent extends StatelessWidget {
),
),
if (details case final details?)
merge(
DefaultTextStyle.merge(
style: style.detailsTextStyle,
textHeightBehavior: const TextHeightBehavior(
applyHeightToFirstAscent: false,
Expand Down
3 changes: 1 addition & 2 deletions forui/tool/fetch_arb_files.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import 'dart:convert';
import 'dart:io';
import 'package:collection/collection.dart';
import 'package:http/http.dart' as http;

final pattern = RegExp(r'(widgets|material)_([\w_]+)\.arb');
Expand All @@ -21,7 +20,7 @@ Future<void> main() async {
(json.decode(response.body) as List<dynamic>)
.map((file) => file['name'] as String)
.map((file) => pattern.firstMatch(file)?.group(2))
.whereNotNull()
.nonNulls
.map((locale) => File('lib/l10n/f_$locale.arb'))
.where((arb) => !arb.existsSync())
.forEach(
Expand Down

0 comments on commit 3d2696f

Please sign in to comment.