Browse Source

NullSafety: Migrate more UI widgets

Neeraj Gupta 2 years ago
parent
commit
5884bbe994

+ 1 - 3
lib/ui/settings/general_section_widget.dart

@@ -1,5 +1,3 @@
-// @dart=2.9
-
 import 'package:flutter/material.dart';
 import 'package:photos/services/billing_service.dart';
 import 'package:photos/services/user_service.dart';
@@ -14,7 +12,7 @@ import 'package:photos/utils/dialog_util.dart';
 import 'package:photos/utils/navigation_util.dart';
 
 class GeneralSectionWidget extends StatelessWidget {
-  const GeneralSectionWidget({Key key}) : super(key: key);
+  const GeneralSectionWidget({Key? key}) : super(key: key);
 
   @override
   Widget build(BuildContext context) {

+ 3 - 4
lib/ui/settings/security_section_widget.dart

@@ -1,5 +1,3 @@
-// @dart=2.9
-
 import 'dart:async';
 import 'dart:io';
 
@@ -20,7 +18,7 @@ import 'package:photos/ui/components/toggle_switch_widget.dart';
 import 'package:photos/ui/settings/common_settings.dart';
 
 class SecuritySectionWidget extends StatefulWidget {
-  const SecuritySectionWidget({Key key}) : super(key: key);
+  const SecuritySectionWidget({Key? key}) : super(key: key);
 
   @override
   State<SecuritySectionWidget> createState() => _SecuritySectionWidgetState();
@@ -29,7 +27,8 @@ class SecuritySectionWidget extends StatefulWidget {
 class _SecuritySectionWidgetState extends State<SecuritySectionWidget> {
   final _config = Configuration.instance;
 
-  StreamSubscription<TwoFactorStatusChangeEvent> _twoFactorStatusChangeEvent;
+  late StreamSubscription<TwoFactorStatusChangeEvent>
+      _twoFactorStatusChangeEvent;
 
   @override
   void initState() {