fix(ui_kit): remove null check operator in Loader component
This commit is contained in:
		
							parent
							
								
									f2b8c03dd7
								
							
						
					
					
						commit
						702164082a
					
				@ -64,5 +64,4 @@ class Loaders extends DemoPage {
 | 
				
			|||||||
          const Gap(20),
 | 
					          const Gap(20),
 | 
				
			||||||
        ],
 | 
					        ],
 | 
				
			||||||
      );
 | 
					      );
 | 
				
			||||||
      
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -59,15 +59,14 @@ class Loader extends LoaderComponent with $LoaderCWMixin {
 | 
				
			|||||||
    final style = _resolve(context);
 | 
					    final style = _resolve(context);
 | 
				
			||||||
    final dimension =
 | 
					    final dimension =
 | 
				
			||||||
        (radius != null) ? radius! * 2 : context.buttonTheme.height;
 | 
					        (radius != null) ? radius! * 2 : context.buttonTheme.height;
 | 
				
			||||||
 | 
					 | 
				
			||||||
    return SizedBox.square(
 | 
					    return SizedBox.square(
 | 
				
			||||||
      dimension: dimension,
 | 
					      dimension: dimension,
 | 
				
			||||||
      child: RepaintBoundary(
 | 
					      child: RepaintBoundary(
 | 
				
			||||||
        child: CustomPaint(
 | 
					        child: CustomPaint(
 | 
				
			||||||
          painter: _LoaderPainter(
 | 
					          painter: _LoaderPainter(
 | 
				
			||||||
            style.colors!,
 | 
					            style.colors ?? const MultiColor([]),
 | 
				
			||||||
            dimension / 2,
 | 
					            dimension / 2,
 | 
				
			||||||
            style.stroke!,
 | 
					            style.stroke ?? 4,
 | 
				
			||||||
            flip: flip ?? false,
 | 
					            flip: flip ?? false,
 | 
				
			||||||
          ),
 | 
					          ),
 | 
				
			||||||
        )
 | 
					        )
 | 
				
			||||||
 | 
				
			|||||||
@ -24,6 +24,12 @@ class LoaderThemeResolver
 | 
				
			|||||||
    required this.customStyleFn,
 | 
					    required this.customStyleFn,
 | 
				
			||||||
  });
 | 
					  });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  @override
 | 
				
			||||||
 | 
					  final LoaderStyle? Function(
 | 
				
			||||||
 | 
					    BuildContext context, {
 | 
				
			||||||
 | 
					    void extra,
 | 
				
			||||||
 | 
					  }) customStyleFn;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  /// Values taken from <https://api.flutter.dev/flutter/material/ElevatedButton/defaultStyleOf.html>
 | 
					  /// Values taken from <https://api.flutter.dev/flutter/material/ElevatedButton/defaultStyleOf.html>
 | 
				
			||||||
  @override
 | 
					  @override
 | 
				
			||||||
  LoaderStyle computeDefaultValue(
 | 
					  LoaderStyle computeDefaultValue(
 | 
				
			||||||
@ -39,12 +45,6 @@ class LoaderThemeResolver
 | 
				
			|||||||
        stroke: 4,
 | 
					        stroke: 4,
 | 
				
			||||||
      );
 | 
					      );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  @override
 | 
					 | 
				
			||||||
  final LoaderStyle? Function(
 | 
					 | 
				
			||||||
    BuildContext context, {
 | 
					 | 
				
			||||||
    void extra,
 | 
					 | 
				
			||||||
  }) customStyleFn;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  @override
 | 
					  @override
 | 
				
			||||||
  LoaderStyle? computeExtensionValueFn(
 | 
					  LoaderStyle? computeExtensionValueFn(
 | 
				
			||||||
    BuildContext context,
 | 
					    BuildContext context,
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user