94 lines
2.7 KiB
Dart
94 lines
2.7 KiB
Dart
import 'package:didvan/config/theme_data.dart';
|
|
import 'package:didvan/constants/app_icons.dart';
|
|
import 'package:didvan/widgets/didvan/text.dart';
|
|
import 'package:flutter/material.dart';
|
|
|
|
class FloatingNavigationBar extends StatelessWidget {
|
|
final bool isRadar;
|
|
const FloatingNavigationBar({Key? key, required this.isRadar})
|
|
: super(key: key);
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
final Color foregroundColor =
|
|
Theme.of(context).brightness == Brightness.dark
|
|
? Theme.of(context).colorScheme.focusedBorder
|
|
: Theme.of(context).colorScheme.focused;
|
|
return Container(
|
|
margin: const EdgeInsets.only(left: 32, right: 32, bottom: 20),
|
|
width: double.infinity,
|
|
height: 48,
|
|
padding: const EdgeInsets.symmetric(horizontal: 12),
|
|
decoration: BoxDecoration(
|
|
color: Theme.of(context).colorScheme.navigation,
|
|
borderRadius: BorderRadius.circular(24),
|
|
border: Border.all(
|
|
color: Theme.of(context).colorScheme.cardBorder,
|
|
),
|
|
),
|
|
child: Theme(
|
|
data: Theme.of(context).copyWith(
|
|
iconTheme: IconThemeData(
|
|
color: foregroundColor,
|
|
),
|
|
),
|
|
child: Row(
|
|
children: [
|
|
IconButton(
|
|
onPressed: () => Navigator.of(context).pop(),
|
|
icon: const Icon(
|
|
Icons.arrow_back,
|
|
),
|
|
),
|
|
const Spacer(),
|
|
if (isRadar)
|
|
IconButton(
|
|
onPressed: () {},
|
|
icon: const Icon(
|
|
DidvanIcons.bookmark_regular,
|
|
),
|
|
),
|
|
if (isRadar)
|
|
IconButton(
|
|
onPressed: () {},
|
|
icon: const Icon(
|
|
DidvanIcons.evaluation_regular,
|
|
),
|
|
),
|
|
SizedBox(
|
|
width: 48,
|
|
child: Row(
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
children: [
|
|
DidvanText(
|
|
'2',
|
|
color: foregroundColor,
|
|
),
|
|
const SizedBox(width: 4),
|
|
const Icon(
|
|
DidvanIcons.chats_regular,
|
|
),
|
|
],
|
|
),
|
|
),
|
|
if (!isRadar)
|
|
IconButton(
|
|
onPressed: () {},
|
|
icon: const Icon(
|
|
DidvanIcons.bookmark_regular,
|
|
),
|
|
),
|
|
if (isRadar)
|
|
IconButton(
|
|
onPressed: () {},
|
|
icon: const Icon(
|
|
Icons.more_horiz,
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|