Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature - Upgrade flutter sdk ke versi 3.19.6 #36

Merged
merged 3 commits into from
Jun 6, 2024
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
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Install & set Flutter version
uses: subosito/flutter-action@v2
with:
flutter-version: '3.10.4'
flutter-version: '3.19.6'
channel: 'stable'
- name: Get package
run: flutter pub get
Expand Down
8 changes: 7 additions & 1 deletion lib/core/network/network_info.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ class NetworkInfoImpl implements NetworkInfo {
@override
Future<bool> get isConnected async {
final connectivityResult = await connectivity.checkConnectivity();
return connectivityResult != ConnectivityResult.none;
if (connectivityResult.contains(ConnectivityResult.none)) {
return false;
} else if (connectivityResult.isEmpty) {
return false;
} else {
return true;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ class AddEditMemberPage extends StatefulWidget {
final UserProfileResponse? defaultValue;

const AddEditMemberPage({
Key? key,
super.key,
this.defaultValue,
}) : super(key: key);
});

@override
State<AddEditMemberPage> createState() => _AddEditMemberPageState();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class EditProfilePage extends StatefulWidget {
static const routePath = '/edit-profile';
static const routeName = 'edit-profile';

const EditProfilePage({Key? key}) : super(key: key);
const EditProfilePage({super.key});

@override
State<EditProfilePage> createState() => _EditProfilePageState();
Expand Down
2 changes: 1 addition & 1 deletion lib/feature/presentation/page/error/error_page.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'package:flutter/material.dart';

class ErrorPage extends StatelessWidget {
const ErrorPage({Key? key}) : super(key: key);
const ErrorPage({super.key});

@override
Widget build(BuildContext context) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ class ForgotPasswordPage extends StatefulWidget {
final String? email;

const ForgotPasswordPage({
Key? key,
super.key,
required this.email,
}) : super(key: key);
});

@override
State<ForgotPasswordPage> createState() => _ForgotPasswordPageState();
Expand Down
10 changes: 6 additions & 4 deletions lib/feature/presentation/page/home/home_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class HomePage extends StatefulWidget {
static const routePath = '/home';
static const routeName = 'home';

const HomePage({Key? key}) : super(key: key);
const HomePage({super.key});

@override
State<HomePage> createState() => _HomePageState();
Expand Down Expand Up @@ -129,7 +129,9 @@ class _HomePageState extends State<HomePage> with TrayListener, WindowListener {
final appDatabase = await sl.getAsync<AppDatabase>();
trackDao = appDatabase.trackDao;
} catch (error) {
widgetHelper.showSnackBar(context, 'error: $error');
if (mounted) {
widgetHelper.showSnackBar(context, 'error: $error');
}
}
setupCronTimer();
doLoadDataTask();
Expand Down Expand Up @@ -644,15 +646,15 @@ class _HomePageState extends State<HomePage> with TrayListener, WindowListener {
onTap: () async {
final isPermissionScreenRecordingGranted =
await platformChannelHelper.checkPermissionScreenRecording();
if (mounted && isPermissionScreenRecordingGranted != null && !isPermissionScreenRecordingGranted) {
if (context.mounted && isPermissionScreenRecordingGranted != null && !isPermissionScreenRecordingGranted) {
widgetHelper.showDialogPermissionScreenRecording(context);
return;
}

if (isPermissionScreenRecordingGranted!) {
final isPermissionAccessibilityGranted =
await platformChannelHelper.checkPermissionAccessibility();
if (mounted && isPermissionAccessibilityGranted != null && !isPermissionAccessibilityGranted) {
if (context.mounted && isPermissionAccessibilityGranted != null && !isPermissionAccessibilityGranted) {
widgetHelper.showDialogPermissionAccessibility(context);
return;
}
Expand Down
4 changes: 2 additions & 2 deletions lib/feature/presentation/page/login/login_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class LoginPage extends StatefulWidget {
static const routePath = '/login';
static const routeName = 'login';

const LoginPage({Key? key}) : super(key: key);
const LoginPage({super.key});

@override
State<LoginPage> createState() => _LoginPageState();
Expand Down Expand Up @@ -122,7 +122,7 @@ class _LoginPageState extends State<LoginPage> {
final email = controllerEmail.text.trim();
context.pushNamed(
ForgotPasswordPage.routeName,
queryParams: {
queryParameters: {
ForgotPasswordPage.parameterEmail: email,
},
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class ManualTrackingPage extends StatefulWidget {
static const routePath = '/manual-tracking';
static const routeName = 'manual-tracking';

const ManualTrackingPage({Key? key}) : super(key: key);
const ManualTrackingPage({super.key});

@override
State<ManualTrackingPage> createState() => _ManualTrackingPageState();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class MemberSettingPage extends StatefulWidget {
static const routePath = '/member-setting';
static const routeName = 'member-setting';

const MemberSettingPage({Key? key}) : super(key: key);
const MemberSettingPage({super.key});

@override
State<MemberSettingPage> createState() => _MemberSettingPageState();
Expand Down
4 changes: 2 additions & 2 deletions lib/feature/presentation/page/photo_view/photo_view_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ class PhotoViewPage extends StatefulWidget {
final bool? isShowIconDownload;

PhotoViewPage({
Key? key,
super.key,
required this.listPhotos,
required this.isShowIconDownload,
}) : super(key: key);
});

@override
State<PhotoViewPage> createState() => _PhotoViewPageState();
Expand Down
4 changes: 2 additions & 2 deletions lib/feature/presentation/page/register/register_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class RegisterPage extends StatefulWidget {
static const routePath = '/register';
static const routeName = 'register';

const RegisterPage({Key? key}) : super(key: key);
const RegisterPage({super.key});

@override
State<RegisterPage> createState() => _RegisterPageState();
Expand Down Expand Up @@ -51,7 +51,7 @@ class _RegisterPageState extends State<RegisterPage> {
} else if (state is SuccessSubmitSignUpState) {
context.goNamed(
RegisterSuccessPage.routeName,
queryParams: {
queryParameters: {
'email': state.response.email ?? '-',
},
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ class RegisterSuccessPage extends StatelessWidget {
final String email;

RegisterSuccessPage({
Key? key,
super.key,
required this.email,
}) : super(key: key);
});

final helper = sl<Helper>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class ReportScreenshotPage extends StatefulWidget {
static const routePath = '/report-screenshot';
static const routeName = 'report-screenshot';

const ReportScreenshotPage({Key? key}) : super(key: key);
const ReportScreenshotPage({super.key});

@override
State<ReportScreenshotPage> createState() => _ReportScreenshotPageState();
Expand Down Expand Up @@ -91,10 +91,13 @@ class _ReportScreenshotPageState extends State<ReportScreenshotPage> {

@override
Widget build(BuildContext context) {
return WillPopScope(
onWillPop: () async {
return PopScope(
canPop: false,
onPopInvoked: (didPop) {
if (didPop) {
return;
}
context.pop(isRefreshPreviousPage);
return false;
},
child: GestureDetector(
onTap: () => widgetHelper.unfocus(context),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ class ResetPasswordPage extends StatefulWidget {
final String code;

const ResetPasswordPage({
Key? key,
super.key,
required this.code,
}) : super(key: key);
});

@override
State<ResetPasswordPage> createState() => _ResetPasswordPageState();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ class ResetPasswordSuccessPage extends StatelessWidget {
static const routeName = 'reset-password-success';

ResetPasswordSuccessPage({
Key? key,
}) : super(key: key);
super.key,
});

final helper = sl<Helper>();

Expand Down
2 changes: 1 addition & 1 deletion lib/feature/presentation/page/setting/setting_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class SettingPage extends StatefulWidget {
static const routePath = '/setting';
static const routeName = 'setting';

const SettingPage({Key? key}) : super(key: key);
const SettingPage({super.key});

@override
State<SettingPage> createState() => _SettingPageState();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class SettingDiscordPage extends StatefulWidget {
static const routePath = '/setting-discord';
static const routeName = 'setting-discord';

const SettingDiscordPage({Key? key}) : super(key: key);
const SettingDiscordPage({super.key});

@override
State<SettingDiscordPage> createState() => _SettingDiscordPageState();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class SettingMemberBlurScreenshotPage extends StatefulWidget {
static const routePath = '/member-blur-screenshot';
static const routeName = 'member-blur-screenshot';

const SettingMemberBlurScreenshotPage({Key? key}) : super(key: key);
const SettingMemberBlurScreenshotPage({super.key});

@override
State<SettingMemberBlurScreenshotPage> createState() => _SettingMemberBlurScreenshotPageState();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ class SetupCredentialPage extends StatefulWidget {
final bool isShowWarning;

const SetupCredentialPage({
Key? key,
super.key,
this.isFromSplashScreen = false,
this.isShowWarning = false,
}) : super(key: key);
});

@override
State<SetupCredentialPage> createState() => _SetupCredentialPageState();
Expand Down
2 changes: 1 addition & 1 deletion lib/feature/presentation/page/splash/splash_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class SplashPage extends StatefulWidget {
static const routePath = '/splash';
static const routeName = 'splash';

const SplashPage({Key? key}) : super(key: key);
const SplashPage({super.key});

@override
State<SplashPage> createState() => _SplashPageState();
Expand Down
2 changes: 1 addition & 1 deletion lib/feature/presentation/page/sync/sync_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class SyncPage extends StatefulWidget {
static const routePath = '/sync';
static const routeName = 'sync';

const SyncPage({Key? key}) : super(key: key);
const SyncPage({super.key});

@override
State<SyncPage> createState() => _SyncPageState();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class UserRegistrationSettingPage extends StatefulWidget {
static const routePath = '/user-registration-setting';
static const routeName = 'user-registration-setting';

const UserRegistrationSettingPage({Key? key}) : super(key: key);
const UserRegistrationSettingPage({super.key});

@override
State<UserRegistrationSettingPage> createState() => _UserRegistrationSettingPageState();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ class VerifyForgotPasswordPage extends StatefulWidget {
final String email;

const VerifyForgotPasswordPage({
Key? key,
super.key,
required this.email,
}) : super(key: key);
});

@override
State<VerifyForgotPasswordPage> createState() => _VerifyForgotPasswordPageState();
Expand Down
4 changes: 2 additions & 2 deletions lib/feature/presentation/widget/widget_choose_project.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ class WidgetChooseProject extends StatefulWidget {

const WidgetChooseProject({
required this.defaultSelectedProjectId,
Key? key,
}) : super(key: key);
super.key,
});

@override
State<WidgetChooseProject> createState() => _WidgetChooseProjectState();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ class WidgetCustomCircularProgressIndicator extends StatelessWidget {
final Color? color;

const WidgetCustomCircularProgressIndicator({
Key? key,
super.key,
this.color,
}) : super(key: key);
});

@override
Widget build(BuildContext context) {
Expand Down
4 changes: 2 additions & 2 deletions lib/feature/presentation/widget/widget_error.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ class WidgetError extends StatelessWidget {
final Function()? onTryAgain;

const WidgetError({
Key? key,
super.key,
required this.title,
required this.message,
this.onTryAgain,
}) : super(key: key);
});

@override
Widget build(BuildContext context) {
Expand Down
4 changes: 2 additions & 2 deletions lib/feature/presentation/widget/widget_icon_circle.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ class WidgetIconCircle extends StatelessWidget {
required this.iconData,
this.size = 32.0,
this.padding = 16.0,
Key? key,
}) : super(key: key);
super.key,
});

@override
Widget build(BuildContext context) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import 'package:dipantau_desktop_client/feature/presentation/widget/widget_custo
import 'package:flutter/material.dart';

class WidgetLoadingCenterFullScreen extends StatelessWidget {
const WidgetLoadingCenterFullScreen({Key? key}) : super(key: key);
const WidgetLoadingCenterFullScreen({super.key});

@override
Widget build(BuildContext context) {
Expand Down
4 changes: 2 additions & 2 deletions lib/feature/presentation/widget/widget_primary_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ class WidgetPrimaryButton extends StatelessWidget {
final ButtonStyle? buttonStyle;

const WidgetPrimaryButton({
Key? key,
super.key,
required this.onPressed,
required this.child,
this.isLoading,
this.buttonStyle,
}) : super(key: key);
});

@override
Widget build(BuildContext context) {
Expand Down
4 changes: 2 additions & 2 deletions lib/feature/presentation/widget/widget_theme_container.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ class WidgetThemeContainer extends StatefulWidget {
final Color? borderColor;

const WidgetThemeContainer({
Key? key,
super.key,
required this.mode,
required this.width,
required this.height,
this.borderColor,
}) : super(key: key);
});

@override
State<WidgetThemeContainer> createState() => _WidgetThemeContainerState();
Expand Down
Loading
Loading