feat : inspection
This commit is contained in:
@@ -19,6 +19,7 @@ class RElevated extends StatelessWidget {
|
||||
this.isLoading = false,
|
||||
this.child,
|
||||
this.enabled = true,
|
||||
this.progress = 0.0, // اضافه شد
|
||||
}) : assert(text != null || child != null, 'Either text or child must be provided');
|
||||
|
||||
final String? text;
|
||||
@@ -35,7 +36,7 @@ class RElevated extends StatelessWidget {
|
||||
final TextStyle? textStyle;
|
||||
final bool isLoading;
|
||||
final bool enabled;
|
||||
|
||||
final double progress; // 0.0 تا 1.0
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final bool isEnabled = enabled && !isLoading;
|
||||
@@ -59,6 +60,7 @@ class RElevated extends StatelessWidget {
|
||||
child: CircularProgressIndicator(
|
||||
strokeWidth: 2.5,
|
||||
valueColor: AlwaysStoppedAnimation<Color>(foregroundColor),
|
||||
value: progress > 0.0 && progress <= 1.0 ? progress : null,
|
||||
),
|
||||
)
|
||||
: child ?? Text(text!),
|
||||
|
||||
@@ -6,5 +6,5 @@ void getFileSizeInKB(String filePath, {String? tag}) {
|
||||
final file = File(filePath);
|
||||
final bytes = file.lengthSync();
|
||||
var size = (bytes / 1024).ceil();
|
||||
iLog('${tag ?? 'Picked'} image Size: $size');
|
||||
iLog('${tag ?? 'Picked'} image Size: $size , fileName : ${file.path.split('/').last}');
|
||||
}
|
||||
Reference in New Issue
Block a user