Commit b5115cdd by Rizal Hermawan

fix : conforms to flutter 2.5.x syntax

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