Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 0 additions & 28 deletions example/analysis_options.yaml

This file was deleted.

18 changes: 12 additions & 6 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,10 @@ class ExampleApp extends StatelessWidget {
onPressed: () {
_openSecondSimpleItemPicker(context, countryList);
},
child: Text('Simple Item picker with different theme',
textAlign: TextAlign.center),
child: Text(
'Simple Item picker with different theme',
textAlign: TextAlign.center,
),
),
),
SizedBox(
Expand All @@ -112,8 +114,10 @@ class ExampleApp extends StatelessWidget {
onPressed: () {
_openDatePickerWithButtonStyle(context);
},
child: Text('Date Picker with button style',
textAlign: TextAlign.center),
child: Text(
'Date Picker with button style',
textAlign: TextAlign.center,
),
),
),
SizedBox(
Expand Down Expand Up @@ -186,8 +190,10 @@ class ExampleApp extends StatelessWidget {
onPressed: () {
_openDateTimePickerWithCustomButton(context);
},
child: Text('Bottom picker with custom button',
textAlign: TextAlign.center),
child: Text(
'Bottom picker with custom button',
textAlign: TextAlign.center,
),
),
),
SizedBox(
Expand Down
20 changes: 10 additions & 10 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ packages:
dependency: transitive
description:
name: async
sha256: d2872f9c19731c2e5f10444b14686eb7cc85c76274bd6c16e1816bff9a3bab63
sha256: "758e6d74e971c3e5aceb4110bfd6698efc7f501675bcfe0c775459a8140750eb"
url: "https://pub.dev"
source: hosted
version: "2.12.0"
version: "2.13.0"
boolean_selector:
dependency: transitive
description:
Expand Down Expand Up @@ -60,10 +60,10 @@ packages:
dependency: transitive
description:
name: fake_async
sha256: "6a95e56b2449df2273fd8c45a662d6947ce1ebb7aafe80e550a3f68297f3cacc"
sha256: "5368f224a74523e8d2e7399ea1638b37aecfca824a3cc4dfdf77bf1fa905ac44"
url: "https://pub.dev"
source: hosted
version: "1.3.2"
version: "1.3.3"
flutter:
dependency: "direct main"
description: flutter
Expand All @@ -83,18 +83,18 @@ packages:
dependency: "direct main"
description:
name: intl
sha256: d6f56758b7d3014a48af9701c085700aac781a92a87a62b1333b46d8879661cf
sha256: "3df61194eb431efc39c4ceba583b95633a403f46c9fd341e550ce0bfa50e9aa5"
url: "https://pub.dev"
source: hosted
version: "0.19.0"
version: "0.20.2"
leak_tracker:
dependency: transitive
description:
name: leak_tracker
sha256: c35baad643ba394b40aac41080300150a4f08fd0fd6a10378f8f7c6bc161acec
sha256: "6bb818ecbdffe216e81182c2f0714a2e62b593f4a4f13098713ff1685dfb6ab0"
url: "https://pub.dev"
source: hosted
version: "10.0.8"
version: "10.0.9"
leak_tracker_flutter_testing:
dependency: transitive
description:
Expand Down Expand Up @@ -208,10 +208,10 @@ packages:
dependency: transitive
description:
name: vm_service
sha256: "0968250880a6c5fe7edc067ed0a13d4bae1577fe2771dcf3010d52c4a9d3ca14"
sha256: ddfa8d30d89985b96407efce8acbdd124701f96741f2d981ca860662f1c0dc02
url: "https://pub.dev"
source: hosted
version: "14.3.1"
version: "15.0.0"
sdks:
dart: ">=3.7.0-0 <4.0.0"
flutter: ">=3.18.0-18.0.pre.54"
42 changes: 21 additions & 21 deletions lib/bottom_picker.dart
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class BottomPicker extends StatefulWidget {
late BottomPickerType bottomPickerType;

BottomPicker({
Key? key,
super.key,
required this.pickerTitle,
this.pickerDescription,
required this.items,
Expand Down Expand Up @@ -68,7 +68,7 @@ class BottomPicker extends StatefulWidget {
this.buttonStyle,
this.closeWidget,
this.closeOnSubmit = true,
}) : super(key: key) {
}) {
dateOrder = null;
onRangeDateSubmitPressed = null;
bottomPickerType = BottomPickerType.simple;
Expand All @@ -80,7 +80,7 @@ class BottomPicker extends StatefulWidget {
}

BottomPicker.date({
Key? key,
super.key,
required this.pickerTitle,
this.pickerDescription,
this.titlePadding = const EdgeInsets.all(0),
Expand Down Expand Up @@ -116,7 +116,7 @@ class BottomPicker extends StatefulWidget {
this.itemExtent = 35.0,
this.closeWidget,
this.closeOnSubmit = true,
}) : super(key: key) {
}) {
datePickerMode = CupertinoDatePickerMode.date;
bottomPickerType = BottomPickerType.dateTime;
use24hFormat = false;
Expand All @@ -125,7 +125,7 @@ class BottomPicker extends StatefulWidget {
}

BottomPicker.monthYear({
Key? key,
super.key,
required this.pickerTitle,
this.pickerDescription,
this.titlePadding = const EdgeInsets.all(0),
Expand Down Expand Up @@ -160,7 +160,7 @@ class BottomPicker extends StatefulWidget {
this.itemExtent = 35.0,
this.closeWidget,
this.closeOnSubmit = true,
}) : super(key: key) {
}) {
datePickerMode = CupertinoDatePickerMode.monthYear;
bottomPickerType = BottomPickerType.dateTime;
use24hFormat = false;
Expand All @@ -170,7 +170,7 @@ class BottomPicker extends StatefulWidget {
}

BottomPicker.dateTime({
Key? key,
super.key,
required this.pickerTitle,
this.pickerDescription,
this.titlePadding = const EdgeInsets.all(0),
Expand Down Expand Up @@ -209,15 +209,15 @@ class BottomPicker extends StatefulWidget {
this.showTimeSeparator = false,
this.closeWidget,
this.closeOnSubmit = true,
}) : super(key: key) {
}) {
datePickerMode = CupertinoDatePickerMode.dateAndTime;
bottomPickerType = BottomPickerType.dateTime;
onRangeDateSubmitPressed = null;
assertInitialValues();
}

BottomPicker.time({
Key? key,
super.key,
required this.pickerTitle,
this.pickerDescription,
required this.initialTime,
Expand Down Expand Up @@ -255,7 +255,7 @@ class BottomPicker extends StatefulWidget {
this.itemExtent = 30,
this.closeWidget,
this.closeOnSubmit = true,
}) : super(key: key) {
}) {
datePickerMode = CupertinoDatePickerMode.time;
bottomPickerType = BottomPickerType.time;
dateOrder = null;
Expand All @@ -265,7 +265,7 @@ class BottomPicker extends StatefulWidget {
}

BottomPicker.timer({
Key? key,
super.key,
required this.pickerTitle,
this.timerPickerMode = CupertinoTimerPickerMode.hm,
this.timerSecondsInterval = 1,
Expand Down Expand Up @@ -301,7 +301,7 @@ class BottomPicker extends StatefulWidget {
this.buttonStyle,
this.closeWidget,
this.closeOnSubmit = true,
}) : super(key: key) {
}) {
dateOrder = null;
onRangeDateSubmitPressed = null;
bottomPickerType = BottomPickerType.timer;
Expand All @@ -311,7 +311,7 @@ class BottomPicker extends StatefulWidget {
}

BottomPicker.range({
Key? key,
super.key,
required this.pickerTitle,
this.pickerDescription,
required this.onRangeDateSubmitPressed,
Expand Down Expand Up @@ -348,7 +348,7 @@ class BottomPicker extends StatefulWidget {
this.itemExtent = 30,
this.closeWidget,
this.closeOnSubmit = true,
}) : super(key: key) {
}) {
datePickerMode = CupertinoDatePickerMode.date;
bottomPickerType = BottomPickerType.rangeDate;
dateOrder = null;
Expand All @@ -372,7 +372,7 @@ class BottomPicker extends StatefulWidget {
}

BottomPicker.rangeTime({
Key? key,
super.key,
required this.pickerTitle,
this.pickerDescription,
required this.onRangeTimeSubmitPressed,
Expand Down Expand Up @@ -411,7 +411,7 @@ class BottomPicker extends StatefulWidget {
this.itemExtent = 30,
this.closeWidget,
this.closeOnSubmit = true,
}) : super(key: key) {
}) {
datePickerMode = CupertinoDatePickerMode.time;
bottomPickerType = BottomPickerType.rangeTime;
dateOrder = null;
Expand Down Expand Up @@ -693,9 +693,9 @@ class BottomPicker extends StatefulWidget {
/// Indicates whether the time seperator (":") will be shown or not.
bool showTimeSeparator = false;

/// Indiacate whether the bottom picker will be closed (poped out of the Navigator)
/// Indiacate whether the bottom picker will be closed (poped out of the Navigator)
/// when the submit button is pressed.
///
///
/// By default closeOnSubmit = true.
final bool closeOnSubmit;

Expand Down Expand Up @@ -724,10 +724,10 @@ class BottomPicker extends StatefulWidget {
}

@override
_BottomPickerState createState() => _BottomPickerState();
BottomPickerState createState() => BottomPickerState();
}

class _BottomPickerState extends State<BottomPicker> {
class BottomPickerState extends State<BottomPicker> {
late int selectedItemIndex;
late DateTime selectedDateTime;

Expand Down Expand Up @@ -997,7 +997,7 @@ class _BottomPickerState extends State<BottomPicker> {
}

/// Handle the key press event
bool _onKeyPressed(final keyData) {
bool _onKeyPressed(KeyData keyData) {
if (keyData.logical == LogicalKeyboardKey.escape.keyId &&
!disposed &&
widget.dismissable) {
Expand Down
4 changes: 2 additions & 2 deletions lib/widgets/bottom_picker_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class BottomPickerButton extends StatelessWidget {
final BoxDecoration? style;

const BottomPickerButton({
Key? key,
super.key,
required this.onClick,
this.theme = BottomPickerTheme.blue,
this.gradients,
Expand All @@ -21,7 +21,7 @@ class BottomPickerButton extends StatelessWidget {
this.buttonWidth,
this.buttonChild,
this.style,
}) : super(key: key);
});

@override
Widget build(BuildContext context) {
Expand Down
4 changes: 2 additions & 2 deletions lib/widgets/close_icon.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ class CloseIcon extends StatelessWidget {
final double closeIconSize;

const CloseIcon({
Key? key,
super.key,
required this.onPress,
required this.iconColor,
required this.closeIconSize,
}) : super(key: key);
});

@override
Widget build(BuildContext context) {
Expand Down
4 changes: 2 additions & 2 deletions lib/widgets/date_picker.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class DatePicker extends StatelessWidget {
final bool showTimeSeparator;

const DatePicker({
Key? key,
super.key,
required this.initialDateTime,
this.minuteInterval = 1,
this.maxDateTime,
Expand All @@ -27,7 +27,7 @@ class DatePicker extends StatelessWidget {
this.dateOrder,
this.itemExtent = 0,
this.showTimeSeparator = false,
}) : super(key: key);
});

@override
Widget build(BuildContext context) {
Expand Down
4 changes: 2 additions & 2 deletions lib/widgets/range_picker.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class RangePicker extends StatefulWidget {
final bool showTimeSeperator;

const RangePicker({
Key? key,
super.key,
required this.initialFirstDateTime,
required this.initialSecondDateTime,
required this.maxFirstDate,
Expand All @@ -35,7 +35,7 @@ class RangePicker extends StatefulWidget {
this.minuteInterval,
this.itemExtent,
this.showTimeSeperator = false,
}) : super(key: key);
});

@override
State<RangePicker> createState() => _RangePickerState();
Expand Down
4 changes: 2 additions & 2 deletions lib/widgets/simple_picker.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ class SimplePicker extends StatelessWidget {
final Widget? selectionOverlay;

const SimplePicker({
Key? key,
super.key,
required this.items,
required this.onChange,
required this.selectedItemIndex,
required this.textStyle,
required this.itemExtent,
this.selectionOverlay,
}) : super(key: key);
});

@override
Widget build(BuildContext context) {
Expand Down
Loading