Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
material_floating_search_bar_2-0.5.0-edited
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dart-package
material_floating_search_bar_2-0.5.0-edited
Commits
b5115cdd
Commit
b5115cdd
authored
Dec 04, 2023
by
Rizal Hermawan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix : conforms to flutter 2.5.x syntax
parent
d03f48a2
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
14 deletions
+21
-14
lib/src/floating_search_app_bar.dart
+4
-4
lib/src/floating_search_bar_dismissable.dart
+2
-2
lib/src/floating_search_bar_scroll_notifier.dart
+3
-3
lib/src/floating_search_bar_transition.dart
+12
-5
No files found.
lib/src/floating_search_app_bar.dart
View file @
b5115cdd
...
@@ -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
??
''
,
...
...
lib/src/floating_search_bar_dismissable.dart
View file @
b5115cdd
...
@@ -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.
...
...
lib/src/floating_search_bar_scroll_notifier.dart
View file @
b5115cdd
...
@@ -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,
);
);
}
}
...
...
lib/src/floating_search_bar_transition.dart
View file @
b5115cdd
// 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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment