Skip to content

Commit 7fe0978

Browse files
author
M-Ahal
committed
dart fix: always_declare_return_types
1 parent 80bf847 commit 7fe0978

4 files changed

Lines changed: 9 additions & 9 deletions

File tree

example/lib/cupertino_date_picker.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import 'package:flutter/cupertino.dart';
22
import 'package:flutter/material.dart';
33
import 'package:flutter_platform_widgets/flutter_platform_widgets.dart';
44

5-
showDatePickerWithCustomCupertinoStateful(BuildContext context) async {
5+
Future<void> showDatePickerWithCustomCupertinoStateful(BuildContext context) async {
66
final now = DateUtils.dateOnly(DateTime.now());
77
final firstDate = now.subtract(const Duration(days: 100));
88
final lastDate = now.add(const Duration(days: 100));
@@ -23,7 +23,7 @@ showDatePickerWithCustomCupertinoStateful(BuildContext context) async {
2323
}
2424
}
2525

26-
showDatePickerWithCustomCupertino(BuildContext context) async {
26+
Future<void> showDatePickerWithCustomCupertino(BuildContext context) async {
2727
final now = DateUtils.dateOnly(DateTime.now());
2828
final firstDate = now.subtract(const Duration(days: 100));
2929
final lastDate = now.add(const Duration(days: 100));
@@ -61,7 +61,7 @@ showDatePickerWithCustomCupertino(BuildContext context) async {
6161
}
6262
}
6363

64-
_showResultDialog(BuildContext context, String text) {
64+
void _showResultDialog(BuildContext context, String text) {
6565
showPlatformDialog(
6666
context: context,
6767
builder: (_) => PlatformAlertDialog(

example/lib/platform_page.dart.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ ThemeMode _cycleThemeMode(ThemeMode? mode) {
431431
}
432432
}
433433

434-
_showDatePicker(BuildContext context) async {
434+
Future<void> _showDatePicker(BuildContext context) async {
435435
final now = DateUtils.dateOnly(DateTime.now());
436436
final date = await showPlatformDatePicker(
437437
context: context,
@@ -445,7 +445,7 @@ _showDatePicker(BuildContext context) async {
445445
}
446446
}
447447

448-
_showExampleDialog(BuildContext context, String text) {
448+
void _showExampleDialog(BuildContext context, String text) {
449449
showPlatformDialog(
450450
context: context,
451451
builder: (_) => PlatformAlertDialog(
@@ -467,7 +467,7 @@ _showExampleDialog(BuildContext context, String text) {
467467
);
468468
}
469469

470-
_showPopupSheet(BuildContext context, String text) {
470+
void _showPopupSheet(BuildContext context, String text) {
471471
showPlatformModalSheet(
472472
context: context,
473473
builder: (_) => PlatformWidget(

example/lib/tab_impl_page.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ class TabImplementationPage extends StatelessWidget {
6969
}
7070
}
7171

72-
_openPage(
72+
void _openPage(
7373
BuildContext context,
7474
WidgetBuilder pageToDisplayBuilder,
7575
TargetPlatform platform,

lib/src/platform_app.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@ class PlatformApp extends PlatformWidgetBase<CupertinoApp, MaterialApp> {
468468
cupertinoRouter = cupertino;
469469

470470
@override
471-
createMaterialWidget(BuildContext context) {
471+
MaterialApp createMaterialWidget(BuildContext context) {
472472
final dataRouter = materialRouter?.call(context, platform(context));
473473

474474
if (routeInformationParser != null ||
@@ -617,7 +617,7 @@ class PlatformApp extends PlatformWidgetBase<CupertinoApp, MaterialApp> {
617617
}
618618

619619
@override
620-
createCupertinoWidget(BuildContext context) {
620+
CupertinoApp createCupertinoWidget(BuildContext context) {
621621
final dataRouter = cupertinoRouter?.call(context, platform(context));
622622

623623
if (routeInformationParser != null ||

0 commit comments

Comments
 (0)