mirror of
https://github.com/feeddeck/feeddeck.git
synced 2026-04-30 11:28:45 -05:00
Initial commit
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
/// [ElevatedButtonProgressIndicator] can be used within an [ElevatedButton] to
|
||||
/// show a progress indicator, while the action of the button is executed.
|
||||
///
|
||||
/// ElevatedButton.icon(
|
||||
/// style: ElevatedButton.styleFrom(
|
||||
/// maximumSize: const Size.fromHeight(
|
||||
/// Constants.elevatedButtonSize,
|
||||
/// ),
|
||||
/// minimumSize: const Size.fromHeight(
|
||||
/// Constants.elevatedButtonSize,
|
||||
/// ),
|
||||
/// ),
|
||||
/// label: Text(
|
||||
/// AppLocalizations.of(context)
|
||||
/// .dashboardCreateDeckButton,
|
||||
/// ),
|
||||
/// onPressed: isLoading ? null : () => runAction(),
|
||||
/// icon: isLoading
|
||||
/// ? const ElevatedButtonProgressIndicator()
|
||||
/// : const Icon(
|
||||
/// Icons.view_column_outlined,
|
||||
/// ),
|
||||
/// )
|
||||
class ElevatedButtonProgressIndicator extends StatelessWidget {
|
||||
const ElevatedButtonProgressIndicator({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
width: 24,
|
||||
height: 24,
|
||||
padding: const EdgeInsets.all(2.0),
|
||||
child: const CircularProgressIndicator(
|
||||
color: Colors.white,
|
||||
strokeWidth: 2,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user