* feat(span_card): simplifying popup * generated --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: ggurdin <46800240+ggurdin@users.noreply.github.com>
26 lines
584 B
Dart
26 lines
584 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
class WhyButton extends StatelessWidget {
|
|
const WhyButton({
|
|
super.key,
|
|
required this.onPress,
|
|
required this.loading,
|
|
});
|
|
|
|
final VoidCallback onPress;
|
|
final bool loading;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return IconButton(
|
|
onPressed: loading ? null : onPress,
|
|
icon: loading
|
|
? const SizedBox(
|
|
width: 24,
|
|
height: 24,
|
|
child: CircularProgressIndicator(),
|
|
)
|
|
: const Icon(Icons.lightbulb_outline, size: 24),
|
|
);
|
|
}
|
|
}
|