Skip to content

Commit

Permalink
bug fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
sonerxdev committed Sep 29, 2021
1 parent b01f2dd commit 7bb9ab3
Show file tree
Hide file tree
Showing 4 changed files with 188 additions and 78 deletions.
2 changes: 0 additions & 2 deletions lib/smartScooterApp/screens/bottom_nav_bar.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import 'package:animation_library/core/base_state.dart';
import 'package:animation_library/core/constants.dart';

import 'package:animation_library/smartScooterApp/models/home_controller.dart';
import 'package:animation_library/smartScooterApp/screens/battery_page.dart';
import 'package:animation_library/smartScooterApp/screens/home_page.dart';
Expand Down
42 changes: 26 additions & 16 deletions lib/smartScooterApp/screens/home_page.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import 'package:animation_library/core/base_state.dart';
import 'package:animation_library/core/constants.dart';
import 'package:animation_library/smartScooterApp/models/home_controller.dart';
import 'package:animation_library/smartScooterApp/screens/profile_page.dart';
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:provider/provider.dart';
Expand Down Expand Up @@ -48,20 +49,29 @@ class HomePage extends StatelessWidget {
elevation: 0.0,
leading: Padding(
padding: context.insetsAll(0.01),
child: CircleAvatar(
child: Padding(
padding: EdgeInsets.only(
left: context.dynamicWidth(0.07),
bottom: context.dynamicHeight(0.1),
),
child: Icon(
Icons.circle,
color: Colors.red,
size: 16.0,
),
child: GestureDetector(
onTap: () => Navigator.push(
context,
MaterialPageRoute(builder: (context) => ProfilePage()),
),
backgroundImage: AssetImage(
"assets/images/person.jpg",
child: Hero(
tag: 'profile-photo',
child: CircleAvatar(
child: Padding(
padding: EdgeInsets.only(
left: context.dynamicWidth(0.07),
bottom: context.dynamicHeight(0.1),
),
child: Icon(
Icons.circle,
color: Colors.red,
size: 16.0,
),
),
backgroundImage: AssetImage(
"assets/images/person.jpg",
),
),
),
),
),
Expand Down Expand Up @@ -167,7 +177,7 @@ class HomePage extends StatelessWidget {
style: GoogleFonts.yantramanav(
textStyle: TextStyle(
fontSize: 17,
color: Colors.white,
color: Colors.white70,
fontWeight: FontWeight.w400,
),
),
Expand All @@ -194,7 +204,7 @@ class HomePage extends StatelessWidget {
style: GoogleFonts.yantramanav(
textStyle: TextStyle(
fontSize: 17,
color: Colors.white,
color: Colors.white70,
fontWeight: FontWeight.w400,
),
),
Expand All @@ -221,7 +231,7 @@ class HomePage extends StatelessWidget {
style: GoogleFonts.yantramanav(
textStyle: TextStyle(
fontSize: 17,
color: Colors.white,
color: Colors.white70,
fontWeight: FontWeight.w400,
),
),
Expand Down
144 changes: 86 additions & 58 deletions lib/smartScooterApp/screens/location_page.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import 'package:animation_library/core/base_state.dart';
import 'package:animation_library/core/constants.dart';
import 'package:animation_library/smartScooterApp/screens/profile_page.dart';
import 'package:flutter/material.dart';
import 'package:flutter_map/flutter_map.dart';
import 'package:google_fonts/google_fonts.dart';
Expand Down Expand Up @@ -86,20 +87,29 @@ class LocationPage extends StatelessWidget {
Positioned(
top: context.dynamicHeight(0.03),
right: context.dynamicWidth(0.05),
child: CircleAvatar(
child: Padding(
padding: EdgeInsets.only(
left: context.dynamicWidth(0.07),
bottom: context.dynamicHeight(0.1),
),
child: Icon(
Icons.circle,
color: Colors.red,
size: 16.0,
),
child: GestureDetector(
onTap: () => Navigator.push(
context,
MaterialPageRoute(builder: (context) => ProfilePage()),
),
backgroundImage: AssetImage(
"assets/images/person.jpg",
child: Hero(
tag: 'profile-photo',
child: CircleAvatar(
child: Padding(
padding: EdgeInsets.only(
left: context.dynamicWidth(0.07),
bottom: context.dynamicHeight(0.1),
),
child: Icon(
Icons.circle,
color: Colors.red,
size: 16.0,
),
),
backgroundImage: AssetImage(
"assets/images/person.jpg",
),
),
),
),
),
Expand Down Expand Up @@ -147,35 +157,45 @@ class MapItemDetails extends StatelessWidget {
return Padding(
padding: context.insetsAll(0.06),
child: Container(
padding: context.insetsAll(0.05),
padding: EdgeInsets.only(
top: context.dynamicHeight(0.055),
bottom: context.dynamicHeight(0.055),
// left: context.dynamicWidth(0.01),
// right: context.dynamicWidth(0.04),
),
decoration: boxDecoration1(),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Expanded(
Container(
height: context.dynamicHeight(0.2),
width: context.dynamicWidth(0.2),
child: Image.asset(
"assets/images/scooter.png",
),
),
Column(
children: [
Text(
"Battery",
style: GoogleFonts.yantramanav(
textStyle: TextStyle(
fontSize: 15,
color: Colors.white70,
fontWeight: FontWeight.w400,
Expanded(
child: Text(
"Battery",
style: GoogleFonts.yantramanav(
textStyle: TextStyle(
fontSize: 15,
color: Colors.white70,
fontWeight: FontWeight.w400,
),
),
),
),
Text(
"%86",
style: GoogleFonts.yantramanav(
textStyle: TextStyle(
fontSize: 20,
color: textColor,
fontWeight: FontWeight.bold,
Expanded(
child: Text(
"%86",
style: GoogleFonts.yantramanav(
textStyle: TextStyle(
fontSize: 20,
color: textColor,
fontWeight: FontWeight.bold,
),
),
),
),
Expand All @@ -186,23 +206,27 @@ class MapItemDetails extends StatelessWidget {
),
Column(
children: [
Text(
"Distance",
style: GoogleFonts.yantramanav(
textStyle: TextStyle(
fontSize: 15,
color: Colors.white70,
fontWeight: FontWeight.w400,
Expanded(
child: Text(
"Distance",
style: GoogleFonts.yantramanav(
textStyle: TextStyle(
fontSize: 15,
color: Colors.white70,
fontWeight: FontWeight.w400,
),
),
),
),
Text(
"28.3 km",
style: GoogleFonts.yantramanav(
textStyle: TextStyle(
fontSize: 20,
color: textColor,
fontWeight: FontWeight.bold,
Expanded(
child: Text(
"28.3 km",
style: GoogleFonts.yantramanav(
textStyle: TextStyle(
fontSize: 20,
color: textColor,
fontWeight: FontWeight.bold,
),
),
),
),
Expand All @@ -213,23 +237,27 @@ class MapItemDetails extends StatelessWidget {
),
Column(
children: [
Text(
"Duration",
style: GoogleFonts.yantramanav(
textStyle: TextStyle(
fontSize: 15,
color: Colors.white70,
fontWeight: FontWeight.w400,
Expanded(
child: Text(
"Duration",
style: GoogleFonts.yantramanav(
textStyle: TextStyle(
fontSize: 15,
color: Colors.white70,
fontWeight: FontWeight.w400,
),
),
),
),
Text(
"2 hour",
style: GoogleFonts.yantramanav(
textStyle: TextStyle(
fontSize: 20,
color: textColor,
fontWeight: FontWeight.bold,
Expanded(
child: Text(
"2 hour",
style: GoogleFonts.yantramanav(
textStyle: TextStyle(
fontSize: 20,
color: textColor,
fontWeight: FontWeight.bold,
),
),
),
),
Expand Down
78 changes: 76 additions & 2 deletions lib/smartScooterApp/screens/profile_page.dart
Original file line number Diff line number Diff line change
@@ -1,10 +1,84 @@
import 'package:animation_library/core/base_state.dart';
import 'package:animation_library/core/constants.dart';
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';

class ProfilePage extends StatelessWidget {
const ProfilePage({Key? key}) : super(key: key);

@override
Widget build(BuildContext context) {
return Container();
return Scaffold(
backgroundColor: darkBackgroundColor,
appBar: AppBar(
backgroundColor: darkBackgroundColor,
elevation: 0.0,
leading: Padding(
padding: context.insetsAll(0.01),
child: IconButton(
onPressed: () {
Navigator.pop(context);
},
icon: (Icon(
Icons.arrow_back_ios,
color: Colors.white,
)),
color: Colors.black,
),
),
centerTitle: true,
title: Text(
"Profile",
style: GoogleFonts.yantramanav(
textStyle: TextStyle(
fontSize: 20,
color: Colors.white,
fontWeight: FontWeight.w500,
),
),
),
),
body: Column(
children: [
Center(
child: Hero(
tag: 'profile-photo',
child: CircleAvatar(
radius: 80,
child: Padding(
padding: EdgeInsets.only(
left: context.dynamicWidth(0.07),
bottom: context.dynamicHeight(0.1),
),
child: Icon(
Icons.circle,
color: Colors.red,
size: 16.0,
),
),
backgroundImage: AssetImage(
"assets/images/person.jpg",
),
),
),
),
SizedBox(
height: context.dynamicHeight(0.03),
),
Center(
child: Text(
"Soner Karaevli",
style: GoogleFonts.yantramanav(
textStyle: TextStyle(
fontSize: 23,
color: Colors.white,
fontWeight: FontWeight.w400,
),
),
),
)
],
),
);
}
}
}

0 comments on commit 7bb9ab3

Please sign in to comment.