Commit d03f48a2 by Rizal Hermawan

fix : conforms to flutter 2.5.x syntax

parent ffa5710d
......@@ -176,7 +176,7 @@
"languageVersion": "2.12"
}
],
"generated": "2023-12-04T04:51:53.833263Z",
"generated": "2023-12-04T05:24:05.307966Z",
"generator": "pub",
"generatorVersion": "2.14.4"
}
......@@ -108,10 +108,10 @@ file:///C:/24%20Rizal%20Hermawan/flutter_2.5.3/packages/flutter_test/
file:///C:/24%20Rizal%20Hermawan/flutter_2.5.3/packages/flutter_test/lib/
material_floating_search_bar_2
2.12
file:///C:/24%20Rizal%20Hermawan/job/mobile/codingan/edit_pub/material_floating_search_bar_2-0.5.0/
file:///C:/24%20Rizal%20Hermawan/job/mobile/codingan/edit_pub/material_floating_search_bar_2-0.5.0/lib/
file:///C:/24%20Rizal%20Hermawan/job/mobile/codingan/edit_pub/material_floating_search_bar_2-0.5.0-edited/
file:///C:/24%20Rizal%20Hermawan/job/mobile/codingan/edit_pub/material_floating_search_bar_2-0.5.0-edited/lib/
example
2.12
file:///C:/24%20Rizal%20Hermawan/job/mobile/codingan/edit_pub/material_floating_search_bar_2-0.5.0/example/
file:///C:/24%20Rizal%20Hermawan/job/mobile/codingan/edit_pub/material_floating_search_bar_2-0.5.0/example/lib/
file:///C:/24%20Rizal%20Hermawan/job/mobile/codingan/edit_pub/material_floating_search_bar_2-0.5.0-edited/example/
file:///C:/24%20Rizal%20Hermawan/job/mobile/codingan/edit_pub/material_floating_search_bar_2-0.5.0-edited/example/lib/
2
......@@ -3,7 +3,7 @@
#
# For more info see: https://dart.dev/go/dot-packages-deprecation
#
# Generated by pub on 2023-12-04 11:51:53.816327.
# Generated by pub on 2023-12-04 12:24:05.294051.
async:file:///C:/24%20Rizal%20Hermawan/flutter_2.5.3/.pub-cache/hosted/pub.dartlang.org/async-2.8.1/lib/
boolean_selector:file:///C:/24%20Rizal%20Hermawan/flutter_2.5.3/.pub-cache/hosted/pub.dartlang.org/boolean_selector-2.1.0/lib/
characters:file:///C:/24%20Rizal%20Hermawan/flutter_2.5.3/.pub-cache/hosted/pub.dartlang.org/characters-1.1.0/lib/
......
......@@ -23,9 +23,6 @@ dev_dependencies:
flutter:
uses-material-design: true
assets:
- assets/map.jpg
fonts:
- family: Montserrat
fonts:
......
......@@ -20,6 +20,11 @@ part 'floating_search_app_bar.dart';
typedef FloatingSearchBarBuilder = Widget Function(
BuildContext context, Animation<double> transition);
typedef EditableTextContextMenuBuilder = Widget Function(
BuildContext context,
EditableTextState editableTextState,
);
/// An expandable material floating search bar with customizable
/// transitions similar to the ones used extensively
/// by Google in their apps.
......
// ignore_for_file: use_key_in_widget_constructors
import 'package:flutter/material.dart';
import 'floating_search_bar.dart';
......@@ -15,7 +17,6 @@ class FloatingSearchBarAction extends StatelessWidget {
///
/// Typically this widget wraps a [CircularButton].
const FloatingSearchBarAction({
super.key,
this.child,
this.builder,
this.showIfOpened = false,
......@@ -209,11 +210,12 @@ class FloatingSearchBarAction extends StatelessWidget {
/// Creates a row for [FloatingSearchBarActions].
class FloatingSearchActionBar extends StatelessWidget {
const FloatingSearchActionBar({
super.key,
Key? key,
required this.animation,
required this.actions,
this.iconTheme,
});
}) : super(key: key);
final Animation<double> animation;
final List<Widget> actions;
final IconThemeData? iconTheme;
......
......@@ -8,12 +8,13 @@ import 'implicit_animation_builder.dart';
class AnimatedValue extends StatelessWidget {
const AnimatedValue({
super.key,
Key? key,
required this.value,
required this.duration,
this.curve = Curves.linear,
required this.builder,
});
}) : super(key: key);
final double value;
final Duration duration;
final Curve curve;
......
......@@ -7,14 +7,15 @@ import 'package:flutter/material.dart';
class CircularReveal extends StatelessWidget {
const CircularReveal({
super.key,
Key? key,
this.fraction = 1.0,
this.origin = Alignment.center,
this.offset = Offset.zero,
this.child,
this.minRadius,
this.maxRadius,
});
}) : super(key: key);
final double fraction;
final Alignment origin;
final Offset offset;
......
......@@ -3,8 +3,8 @@ import 'package:flutter/material.dart';
// ignore_for_file: public_member_api_docs
class SizeFadeTransition extends StatefulWidget {
// ignore: use_key_in_widget_constructors
const SizeFadeTransition({
super.key,
required this.animation,
this.sizeFraction = 0.5,
this.curve = Curves.linear,
......@@ -12,6 +12,7 @@ class SizeFadeTransition extends StatefulWidget {
this.axisAlignment = 0.0,
this.child,
}) : assert(sizeFraction >= 0.0 && sizeFraction <= 1.0);
final Animation<double> animation;
final Curve curve;
final double sizeFraction;
......
......@@ -6,13 +6,13 @@ class CircularButton extends StatelessWidget {
/// Creates an easier to use [IconButton] for
/// [FloatingSearchBar] actions.
const CircularButton({
super.key,
Key? key,
required this.icon,
required this.onPressed,
this.size = 24.0,
this.padding = const EdgeInsets.all(8),
this.tooltip,
});
}) : super(key: key);
// ignore: public_member_api_docs
final Widget icon;
......
......@@ -11,7 +11,7 @@ class SearchToClear extends StatelessWidget {
/// Creates a Widget that animates between a search and
/// a clear icon.
const SearchToClear({
super.key,
Key? key,
required this.isEmpty,
required this.onTap,
this.duration = const Duration(milliseconds: 500),
......@@ -19,7 +19,7 @@ class SearchToClear extends StatelessWidget {
this.size = 24.0,
this.searchButtonSemanticLabel = 'Search',
this.clearButtonSemanticLabel = 'Clear',
});
}) : super(key: key);
/// If `true`, the search icon will be shown.
final bool isEmpty;
......
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