feat : Adding theme and header
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import 'package:bahla_front/ui/views/home/home_view.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:stacked/stacked.dart';
|
||||
import 'package:bahla_front/ui/common/images.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
|
||||
import 'main_viewmodel.dart';
|
||||
|
||||
@@ -14,24 +16,56 @@ class MainView extends StackedView<MainViewModel> {
|
||||
Widget? child,
|
||||
) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
/*title: Text(
|
||||
'Bahla',
|
||||
style: Theme.of(context).textTheme.headlineMedium!.copyWith(
|
||||
color: Theme.of(context).colorScheme.inverseSurface,
|
||||
),
|
||||
),*/
|
||||
title: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
SvgPicture.asset(
|
||||
Images.logoSvg,
|
||||
//width: 100,
|
||||
height: 60,
|
||||
fit: BoxFit.contain,
|
||||
alignment: Alignment.centerLeft,
|
||||
),
|
||||
],
|
||||
),
|
||||
centerTitle: false,
|
||||
backgroundColor: Theme.of(context).colorScheme.background,
|
||||
shape: Border(
|
||||
bottom: BorderSide(
|
||||
color: Theme.of(context).colorScheme.outline,
|
||||
width: 0.2,
|
||||
),
|
||||
),
|
||||
),
|
||||
backgroundColor: Theme.of(context).colorScheme.background,
|
||||
bottomNavigationBar: BottomNavigationBar(
|
||||
type: BottomNavigationBarType.fixed,
|
||||
backgroundColor: Colors.grey[800],
|
||||
backgroundColor: Theme.of(context).colorScheme.background,
|
||||
currentIndex: viewModel.currentIndex,
|
||||
onTap: viewModel.setIndex,
|
||||
showSelectedLabels: false,
|
||||
showUnselectedLabels: false,
|
||||
iconSize: 35,
|
||||
items: [
|
||||
BottomNavigationBarItem(
|
||||
icon: Icon(Icons.home),
|
||||
label: 'Home',
|
||||
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
icon: Icon(Icons.search),
|
||||
label: 'Search',
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
icon: Icon(Icons.add),
|
||||
label: 'Add',
|
||||
icon: Icon(Icons.favorite_border),
|
||||
label: 'Favorites',
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
icon: Icon(Icons.account_circle),
|
||||
|
||||
Reference in New Issue
Block a user