56 lines
1.6 KiB
Dart
56 lines
1.6 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:gap/gap.dart';
|
|
import 'package:hiddify/core/core_providers.dart';
|
|
import 'package:hiddify/core/router/router.dart';
|
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
|
import 'package:recase/recase.dart';
|
|
|
|
class EmptyProfilesHomeBody extends HookConsumerWidget {
|
|
const EmptyProfilesHomeBody({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context, WidgetRef ref) {
|
|
final t = ref.watch(translationsProvider);
|
|
|
|
return SliverFillRemaining(
|
|
hasScrollBody: false,
|
|
child: Column(
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
children: [
|
|
Text(t.home.emptyProfilesMsg.sentenceCase),
|
|
const Gap(16),
|
|
OutlinedButton.icon(
|
|
onPressed: () => const AddProfileRoute().push(context),
|
|
icon: const Icon(Icons.add),
|
|
label: Text(t.profile.add.buttonText.titleCase),
|
|
)
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|
|
|
|
class EmptyActiveProfileHomeBody extends HookConsumerWidget {
|
|
const EmptyActiveProfileHomeBody({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context, WidgetRef ref) {
|
|
final t = ref.watch(translationsProvider);
|
|
|
|
return SliverFillRemaining(
|
|
hasScrollBody: false,
|
|
child: Column(
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
children: [
|
|
Text(t.home.noActiveProfileMsg.sentenceCase),
|
|
const Gap(16),
|
|
OutlinedButton(
|
|
onPressed: () => const ProfilesRoute().push(context),
|
|
child: Text(t.profile.overviewPageTitle.titleCase),
|
|
)
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|