mirror of
https://gitlab.com/comunic/comunicmobile
synced 2025-06-19 08:15:16 +00:00
Can sign in user
This commit is contained in:
41
lib/utils/ui_utils.dart
Normal file
41
lib/utils/ui_utils.dart
Normal file
@ -0,0 +1,41 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
/// User interface utilities
|
||||
|
||||
/// Build and return a full loading page
|
||||
Widget buildLoadingPage() {
|
||||
return Scaffold(
|
||||
body: Center(
|
||||
child: CircularProgressIndicator(),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
/// Build and return an error card
|
||||
Widget buildErrorCard(String message) {
|
||||
return Card(
|
||||
elevation: 2.0,
|
||||
color: Colors.red,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Row(
|
||||
children: <Widget>[
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(right: 8.0),
|
||||
child: Icon(
|
||||
Icons.error,
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
Flexible(
|
||||
child: Text(
|
||||
message,
|
||||
style: TextStyle(color: Colors.white),
|
||||
maxLines: null,
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
Reference in New Issue
Block a user