mobile bluesky app made with flutter
lazurite.stormlightlabs.org/
mobile
bluesky
flutter
1import 'package:flutter/material.dart';
2
3class AuthButton extends StatelessWidget {
4 const AuthButton({
5 super.key,
6 required this.text,
7 required this.onPressed,
8 this.isLoading = false,
9 });
10
11 final String text;
12 final VoidCallback? onPressed;
13 final bool isLoading;
14
15 @override
16 Widget build(BuildContext context) {
17 return FilledButton.icon(
18 onPressed: isLoading ? null : onPressed,
19 icon: isLoading
20 ? const SizedBox(
21 width: 20,
22 height: 20,
23 child: CircularProgressIndicator(strokeWidth: 2, color: Colors.white),
24 )
25 : const Icon(Icons.login),
26 label: Text(text),
27 );
28 }
29}