M3 Overhaul
This commit is contained in:
@@ -370,7 +370,8 @@ class _GeofenceTestScreenState extends ConsumerState<GeofenceTestScreen> {
|
||||
right: 12,
|
||||
top: 12,
|
||||
child: Card(
|
||||
elevation: 2,
|
||||
elevation: 0,
|
||||
shadowColor: Colors.transparent,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 10.0,
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import '../../theme/m3_motion.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
|
||||
import '../../models/office.dart';
|
||||
@@ -153,7 +154,7 @@ class _OfficesScreenState extends ConsumerState<OfficesScreen> {
|
||||
right: 16,
|
||||
bottom: 16,
|
||||
child: SafeArea(
|
||||
child: FloatingActionButton.extended(
|
||||
child: M3ExpandedFab(
|
||||
onPressed: () => _showOfficeDialog(context, ref),
|
||||
icon: const Icon(Icons.add),
|
||||
label: const Text('New Office'),
|
||||
@@ -172,7 +173,7 @@ class _OfficesScreenState extends ConsumerState<OfficesScreen> {
|
||||
final nameController = TextEditingController(text: office?.name ?? '');
|
||||
String? selectedServiceId = office?.serviceId;
|
||||
|
||||
await showDialog<void>(
|
||||
await m3ShowDialog<void>(
|
||||
context: context,
|
||||
builder: (dialogContext) {
|
||||
bool saving = false;
|
||||
@@ -298,7 +299,7 @@ class _OfficesScreenState extends ConsumerState<OfficesScreen> {
|
||||
WidgetRef ref,
|
||||
Office office,
|
||||
) async {
|
||||
await showDialog<void>(
|
||||
await m3ShowDialog<void>(
|
||||
context: context,
|
||||
builder: (dialogContext) {
|
||||
return AlertDialog(
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import '../../theme/m3_motion.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
|
||||
import '../../models/office.dart';
|
||||
@@ -306,7 +307,7 @@ class _UserManagementScreenState extends ConsumerState<UserManagementScreen> {
|
||||
}
|
||||
|
||||
if (!context.mounted) return;
|
||||
await showDialog<void>(
|
||||
await m3ShowDialog<void>(
|
||||
context: context,
|
||||
builder: (dialogContext) {
|
||||
return StatefulBuilder(
|
||||
@@ -314,8 +315,8 @@ class _UserManagementScreenState extends ConsumerState<UserManagementScreen> {
|
||||
return AlertDialog(
|
||||
shape: AppSurfaces.of(context).dialogShape,
|
||||
title: const Text('Update user'),
|
||||
content: ConstrainedBox(
|
||||
constraints: const BoxConstraints(maxWidth: 520),
|
||||
content: SizedBox(
|
||||
width: 520,
|
||||
child: SingleChildScrollView(
|
||||
child: _buildUserForm(
|
||||
context,
|
||||
@@ -442,10 +443,17 @@ class _UserManagementScreenState extends ConsumerState<UserManagementScreen> {
|
||||
const SizedBox(height: 8),
|
||||
if (offices.isEmpty) const Text('No offices available.'),
|
||||
if (offices.isNotEmpty)
|
||||
Column(
|
||||
children: offices
|
||||
.map(
|
||||
(office) => CheckboxListTile(
|
||||
Container(
|
||||
height: 240,
|
||||
clipBehavior: Clip.hardEdge,
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(color: Theme.of(context).dividerColor),
|
||||
borderRadius: BorderRadius.circular(4),
|
||||
),
|
||||
child: SingleChildScrollView(
|
||||
child: Column(
|
||||
children: offices.map((office) {
|
||||
return CheckboxListTile(
|
||||
value: _selectedOfficeIds.contains(office.id),
|
||||
onChanged: _isSaving
|
||||
? null
|
||||
@@ -460,10 +468,11 @@ class _UserManagementScreenState extends ConsumerState<UserManagementScreen> {
|
||||
},
|
||||
title: Text(office.name),
|
||||
controlAffinity: ListTileControlAffinity.leading,
|
||||
contentPadding: EdgeInsets.zero,
|
||||
),
|
||||
)
|
||||
.toList(),
|
||||
contentPadding: const EdgeInsets.symmetric(horizontal: 8),
|
||||
);
|
||||
}).toList(),
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
Row(
|
||||
@@ -559,7 +568,7 @@ class _UserManagementScreenState extends ConsumerState<UserManagementScreen> {
|
||||
final controller = TextEditingController();
|
||||
final formKey = GlobalKey<FormState>();
|
||||
|
||||
await showDialog<void>(
|
||||
await m3ShowDialog<void>(
|
||||
context: context,
|
||||
builder: (dialogContext) {
|
||||
return AlertDialog(
|
||||
|
||||
Reference in New Issue
Block a user