Commit b5115cdd by Rizal Hermawan

fix : conforms to flutter 2.5.x syntax

parent d03f48a2
......@@ -608,7 +608,7 @@ class FloatingSearchAppBarState extends ImplicitlyAnimatedWidgetState<
scrollPhysics: const NeverScrollableScrollPhysics(),
focusNode: _input.node,
autocorrect: widget.autocorrect,
contextMenuBuilder: widget.contextMenuBuilder,
//contextMenuBuilder: widget.contextMenuBuilder,
cursorColor: style.accentColor,
style: style.queryStyle,
textInputAction: widget.textInputAction,
......@@ -638,7 +638,7 @@ class FloatingSearchAppBarState extends ImplicitlyAnimatedWidgetState<
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: Theme.of(context).appBarTheme.toolbarTextStyle ??
Theme.of(context).textTheme.titleLarge ??
Theme.of(context).textTheme.bodyText2 ??
const TextStyle(),
child: input,
);
......@@ -648,9 +648,9 @@ class FloatingSearchAppBarState extends ImplicitlyAnimatedWidgetState<
final TextTheme textTheme = theme.textTheme;
final TextStyle? textStyle = hasQuery
? style.queryStyle ?? textTheme.titleMedium
? style.queryStyle ?? textTheme.bodyText2
: style.hintStyle ??
textTheme.titleMedium?.copyWith(color: theme.hintColor);
textTheme.bodyText2?.copyWith(color: theme.hintColor);
input = Text(
hasQuery ? query : widget.hint ?? '',
......
......@@ -18,12 +18,12 @@ import 'util/util.dart';
/// height of the child, whether a tap was below the content.
class FloatingSearchBarDismissable extends StatefulWidget {
const FloatingSearchBarDismissable({
super.key,
Key? key,
required this.child,
this.padding,
this.controller,
this.physics,
});
}) : super(key: key);
final Widget child;
/// The amount of space by which to inset the child.
......
......@@ -15,9 +15,9 @@ class FloatingSearchBarScrollNotifier extends StatelessWidget {
/// when the user scrolls down and shown again when the user scrolls
/// up.
const FloatingSearchBarScrollNotifier({
super.key,
Key? key,
required this.child,
});
}) : super(key: key);
/// The vertically scrollable child.
final Widget child;
......@@ -41,7 +41,7 @@ class FloatingSearchBarScrollNotifier extends StatelessWidget {
maxScrollExtent: metrics.maxScrollExtent,
minScrollExtent: metrics.minScrollExtent,
viewportDimension: metrics.viewportDimension,
devicePixelRatio: metrics.devicePixelRatio,
//devicePixelRatio: metrics.devicePixelRatio,
);
}
......
// ignore_for_file: avoid_equals_and_hash_code_on_mutable_classes
// ignore_for_file: avoid_equals_and_hash_code_on_mutable_classes, overridden_fields
import 'dart:math' as math;
import 'dart:ui';
......@@ -277,11 +277,20 @@ abstract class OverlayingFloatingSearchBarTransition
/// {@endtemplate}
class CircularFloatingSearchBarTransition
extends OverlayingFloatingSearchBarTransition {
@override
// ignore: always_specify_types, prefer_typing_uninitialized_variables
var spacing;
// ignore: always_specify_types, prefer_typing_uninitialized_variables, annotate_overrides
var divider;
/// Creates a [FloatingSearchBarTransition],
/// {@macro circular_floating_search_bar_transition}
// ignore: sort_constructors_first
CircularFloatingSearchBarTransition({
super.spacing,
super.divider,
required this.spacing,
required this.divider
});
@override
......@@ -312,8 +321,6 @@ class SlideFadeFloatingSearchBarTransition
/// Creates a [FloatingSearchBarTransition],
/// {@macro fade_in_floating_search_bar_transition}
SlideFadeFloatingSearchBarTransition({
super.spacing,
super.divider,
this.translation = 32.0,
});
final double translation;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment