52 lines
1.5 KiB
Dart
52 lines
1.5 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
|
import '../../../core/l10n/l10n.dart';
|
|
import 'admin_database_panel.dart';
|
|
import 'admin_users_panel.dart';
|
|
|
|
class AdminScreen extends ConsumerStatefulWidget {
|
|
const AdminScreen({super.key});
|
|
|
|
@override
|
|
ConsumerState<AdminScreen> createState() => _AdminScreenState();
|
|
}
|
|
|
|
class _AdminScreenState extends ConsumerState<AdminScreen> {
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return DefaultTabController(
|
|
length: 2,
|
|
child: Column(
|
|
children: [
|
|
Material(
|
|
color: Theme.of(context).colorScheme.surface,
|
|
child: TabBar(
|
|
isScrollable: true,
|
|
padding: const EdgeInsets.symmetric(horizontal: 12),
|
|
tabs: [
|
|
Tab(text: context.l10n.profileUsersTab, icon: const Icon(Icons.people_outline)),
|
|
const Tab(text: 'Databas', icon: Icon(Icons.storage_outlined)),
|
|
],
|
|
),
|
|
),
|
|
const Expanded(
|
|
child: TabBarView(
|
|
children: [
|
|
Padding(
|
|
padding: EdgeInsets.fromLTRB(12, 8, 12, 8),
|
|
child: AdminUsersPanel(embedded: true),
|
|
),
|
|
Padding(
|
|
padding: EdgeInsets.fromLTRB(12, 8, 12, 8),
|
|
child: AdminDatabasePanel(embedded: true),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|
|
|