mirror of
https://github.com/feeddeck/feeddeck.git
synced 2026-03-11 17:47:47 -05:00
Update the used Flutter version to 3.16.0 and all Flutter packages to their latest version. This commit also fixes all of the newly added analysis options and the layout changes introduced with the new Flutter version (e.g. we have to set the "tabAlignment" property in the "TabBar" widget).
42 lines
1.2 KiB
Dart
42 lines
1.2 KiB
Dart
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({super.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,
|
|
),
|
|
);
|
|
}
|
|
}
|