Skip to content

Commit

Permalink
ui update and logic add
Browse files Browse the repository at this point in the history
  • Loading branch information
gokeihub committed Aug 8, 2024
1 parent 7a6cc10 commit 6d3e76a
Show file tree
Hide file tree
Showing 2 changed files with 199 additions and 8 deletions.
197 changes: 194 additions & 3 deletions lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,193 @@
// import 'package:flutter/material.dart';
// import 'package:flutter/services.dart';
// import 'package:test/page/Home/screen/home_page.dart';
// import 'package:test/page/person/screen/person_page.dart';
// import 'package:test/page/setting/screen/setting_page.dart';

// void main() {
// runApp(
// const MyApp(),
// );
// }

// class MyApp extends StatelessWidget {
// const MyApp({super.key});

// @override
// Widget build(BuildContext context) {
// return MaterialApp(
// theme: ThemeData(
// brightness: Brightness.light,
// primaryColor: Colors.blueAccent,
// iconTheme: const IconThemeData(color: Colors.black54),
// textTheme: const TextTheme(
// bodyLarge: TextStyle(color: Colors.black),
// ),
// ),
// darkTheme: ThemeData(
// brightness: Brightness.dark,
// primaryColor: Colors.blueAccent,
// iconTheme: const IconThemeData(color: Colors.white70),
// textTheme: const TextTheme(
// bodyLarge: TextStyle(color: Colors.white),
// ),
// ),
// themeMode: ThemeMode.system,
// home: const StartPage(),
// );
// }
// }

// class StartPage extends StatefulWidget {
// const StartPage({super.key});

// @override
// StartPageState createState() => StartPageState();
// }

// class StartPageState extends State<StartPage> {
// int currentIndex = 0;

// final List<Widget> _pages = [
// const HomePage(),
// const PersonPage(),
// const SettingPage(),
// ];

// final List<IconData> _icons = [
// Icons.home,
// Icons.person,
// Icons.settings,
// ];

// final List<String> _titles = [
// 'Home',
// 'Person',
// 'Settings',
// ];

// @override
// Widget build(BuildContext context) {
// double displayWidth = MediaQuery.of(context).size.width;
// final theme = Theme.of(context);
// return Scaffold(
// body: _pages[currentIndex],
// bottomNavigationBar: buildBottomNavigationBar(displayWidth, theme),
// );
// }

// // ignore: non_constant_identifier_names
// Container buildBottomNavigationBar(double displayWidth, ThemeData theme) {
// return Container(
// margin: EdgeInsets.all(displayWidth * .05),
// height: displayWidth * .155,
// decoration: BoxDecoration(
// color:
// theme.brightness == Brightness.dark ? Colors.black : Colors.white,
// boxShadow: [
// BoxShadow(
// color: Colors.black.withOpacity(.1),
// blurRadius: 30,
// offset: const Offset(0, 10),
// ),
// ],
// borderRadius: BorderRadius.circular(50),
// ),
// child: Row(
// mainAxisAlignment: MainAxisAlignment.spaceEvenly,
// children: List.generate(_icons.length, (index) {
// return buildNavItem(index, displayWidth, theme);
// }),
// ),
// );
// }

// Widget buildNavItem(int index, double displayWidth, ThemeData theme) {
// return GestureDetector(
// onTap: () {
// setState(() {
// currentIndex = index;
// HapticFeedback.lightImpact();
// });
// },
// child: Stack(
// children: [
// AnimatedContainer(
// duration: const Duration(seconds: 1),
// curve: Curves.fastLinearToSlowEaseIn,
// width:
// index == currentIndex ? displayWidth * .32 : displayWidth * .18,
// alignment: Alignment.center,
// child: AnimatedContainer(
// duration: const Duration(seconds: 1),
// curve: Curves.fastLinearToSlowEaseIn,
// height: index == currentIndex ? displayWidth * .12 : 0,
// width: index == currentIndex ? displayWidth * .32 : 0,
// decoration: BoxDecoration(
// color: index == currentIndex
// ? theme.primaryColor.withOpacity(.2)
// : Colors.transparent,
// borderRadius: BorderRadius.circular(50),
// ),
// ),
// ),
// AnimatedContainer(
// duration: const Duration(seconds: 1),
// curve: Curves.fastLinearToSlowEaseIn,
// width:
// index == currentIndex ? displayWidth * .31 : displayWidth * .18,
// alignment: Alignment.center,
// child: Stack(
// children: [
// Row(
// children: [
// AnimatedContainer(
// duration: const Duration(seconds: 1),
// curve: Curves.fastLinearToSlowEaseIn,
// width: index == currentIndex ? displayWidth * .13 : 0,
// ),
// AnimatedOpacity(
// opacity: index == currentIndex ? 1 : 0,
// duration: const Duration(seconds: 1),
// curve: Curves.fastLinearToSlowEaseIn,
// child: Text(
// index == currentIndex ? _titles[index] : '',
// style: TextStyle(
// color: theme.primaryColor,
// fontWeight: FontWeight.w600,
// fontSize: 15,
// ),
// ),
// ),
// ],
// ),
// Row(
// children: [
// AnimatedContainer(
// duration: const Duration(seconds: 1),
// curve: Curves.fastLinearToSlowEaseIn,
// width: index == currentIndex ? displayWidth * .03 : 20,
// ),
// Icon(
// _icons[index],
// size: displayWidth * .076,
// color: index == currentIndex
// ? theme.primaryColor
// : (theme.brightness == Brightness.dark
// ? Colors.white70
// : Colors.black54),
// ),
// ],
// ),
// ],
// ),
// ),
// ],
// ),
// );
// }
// }

import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:test/page/Home/screen/home_page.dart';
Expand Down Expand Up @@ -79,8 +269,9 @@ class StartPageState extends State<StartPage> {
// ignore: non_constant_identifier_names
Container buildBottomNavigationBar(double displayWidth, ThemeData theme) {
return Container(
margin: EdgeInsets.all(displayWidth * .05),
height: displayWidth * .155,
// margin: EdgeInsets.all(displayWidth * .05),
// height: displayWidth * .14,
height: 60,
decoration: BoxDecoration(
color:
theme.brightness == Brightness.dark ? Colors.black : Colors.white,
Expand All @@ -91,7 +282,7 @@ class StartPageState extends State<StartPage> {
offset: const Offset(0, 10),
),
],
borderRadius: BorderRadius.circular(50),
// borderRadius: BorderRadius.circular(50),
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
Expand Down
10 changes: 5 additions & 5 deletions lib/page/person/screen/person_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ class PersonInfoPage extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
const Text(
'Date of Birth:',
'জন্ম তারিখ:',
style: TextStyle(fontWeight: FontWeight.bold),
),
Text(personBirth),
Expand All @@ -202,15 +202,15 @@ class PersonInfoPage extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
const Text(
'Date of Death:',
'মৃত্যুর তারিখ:',
style: TextStyle(fontWeight: FontWeight.bold),
),
Text(personDeath),
Text(personDeath.isEmpty ? 'জীবিত' : personDeath),
],
),
const SizedBox(height: 24),
const Text(
'Biography:',
'জীবনী:',
style: TextStyle(fontWeight: FontWeight.bold),
),
const SizedBox(height: 8),
Expand All @@ -220,7 +220,7 @@ class PersonInfoPage extends StatelessWidget {
),
const SizedBox(height: 24),
const Text(
'Famous poetry',
'বিখ্যাত বই',
style: TextStyle(fontWeight: FontWeight.bold),
),
const SizedBox(height: 8),
Expand Down

0 comments on commit 6d3e76a

Please # to comment.