Files
feeddeck/app/lib/widgets/general/elevated_button_progress_indicator.dart
Rico Berger 4e38cfdb5c [core] Update Flutter to Version 3.16.0 (#70)
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).
2023-11-24 17:12:08 +01:00

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,
),
);
}
}