Commit d03f48a2 by Rizal Hermawan

fix : conforms to flutter 2.5.x syntax

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