Pārlūkot izejas kodu

Used 20pts version of EnteLoadingIcon in loading state of button

ashilkn 2 gadi atpakaļ
vecāks
revīzija
5c9bf7dc4b

+ 4 - 3
lib/ui/common/loading_widget.dart

@@ -1,16 +1,17 @@
-import 'package:flutter/cupertino.dart';
 import 'package:flutter/material.dart';
 import 'package:photos/theme/ente_theme.dart';
 
 class EnteLoadingWidget extends StatelessWidget {
   final Color? color;
-  const EnteLoadingWidget({this.color, Key? key}) : super(key: key);
+  final bool is20pts;
+  const EnteLoadingWidget({this.is20pts = false, this.color, Key? key})
+      : super(key: key);
 
   @override
   Widget build(BuildContext context) {
     return Center(
       child: Padding(
-        padding: const EdgeInsets.all(5),
+        padding: EdgeInsets.all(is20pts ? 3 : 5),
         child: SizedBox.fromSize(
           size: const Size.square(14),
           child: CircularProgressIndicator(

+ 1 - 1
lib/ui/components/large_button_widget.dart

@@ -214,7 +214,7 @@ class _LargeButtonChildWidgetState extends State<LargeButtonChildWidget> {
                       ],
                     )
               : executionState == ExecutionState.inProgress
-                  ? const EnteLoadingWidget()
+                  ? const EnteLoadingWidget(is20pts: true)
                   : executionState == ExecutionState.successful
                       ? const Icon(
                           Icons.check_outlined,