Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import 'package:flutter/material.dart';
- import 'Adapt.dart';
- import 'package:flutter/services.dart';
- import 'package:d_guide/e_screen/Escreen.dart';
- import 'package:d_guide/JoyStick/joy_stick.dart';
- import 'setting_page.dart';
- import 'mobile_phone_binding.dart';
- import 'user_routes.dart';
- import 'help_feedback.dart';
- import 'package:d_guide/MyProfileG/main_page.dart';
- class profileMainPage extends StatefulWidget {
- @override
- profileMainPageState createState() => profileMainPageState();
- }
- class profileMainPageState extends State<profileMainPage> {
- var userID = "14525549255";
- @override
- void initState() {
- // TODO: implement initState
- SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
- super.initState();
- }
- @override
- Widget build(BuildContext context) {
- Widget _statusBar = Container(
- height: Adapt.px(300),
- decoration: BoxDecoration(
- image: DecorationImage(
- image: AssetImage("assets/images/status_bar.png"),
- fit: BoxFit.fitWidth,
- ),
- ),
- child: Stack(
- children: <Widget>[
- //Setting Button
- Align(
- alignment: Alignment.topRight,
- child: IconButton(
- onPressed: () {
- Navigator.push(context,
- MaterialPageRoute(builder: (context) => SettingPage()));
- },
- icon: Icon(
- Icons.settings,
- color: Theme.of(context).primaryColor,
- size: Adapt.px(60),
- ),
- ),
- ),
- //Username and update button
- Align(
- alignment: Alignment.centerLeft,
- child: Text(
- userID,
- style: TextStyle(fontSize: 20.0),
- ),
- ),
- Align(
- alignment: Alignment.centerRight,
- child: FlatButton(
- onPressed: () {
- Navigator.push(
- context,
- MaterialPageRoute(
- builder: (context) => MobilePhoneBinding()));
- },
- child: Row(
- children: <Widget>[
- Text(
- "Update Phone Number",
- style: Theme.of(context).textTheme.caption,
- ),
- Icon(
- Icons.keyboard_arrow_right,
- color: Theme.of(context).textTheme.caption.color,
- ),
- ],
- ),
- ))
- ],
- ),
- );
- Widget _info = Container(
- decoration: BoxDecoration(color: Colors.white),
- margin: EdgeInsets.symmetric(vertical: Adapt.px(20)),
- padding: EdgeInsets.symmetric(vertical: 8),
- child: Column(
- children: <Widget>[
- ListTile(
- leading: Image.asset("assets/images/my_route.png"),
- title: Text("My Routes"),
- trailing: Icon(Icons.keyboard_arrow_right),
- onTap: () {
- Navigator.pushNamed(context, "/userRoutes");
- },
- ),
- Divider(),
- ListTile(
- leading: Image.asset("assets/images/HF.png"),
- title: Text("FAQ & Feedback"),
- trailing: Icon(Icons.keyboard_arrow_right),
- onTap: () {
- Navigator.pushNamed(context, "/helpFeedback");
- },
- ),
- ],
- ),
- );
- return MaterialApp(
- title: 'StatusBar',
- theme: ThemeData(
- primarySwatch: Colors.blue,
- scaffoldBackgroundColor: Color.fromRGBO(237, 237, 237, 1.0),
- ),
- home: Scaffold(
- body: Container(
- child: ListView(
- children: <Widget>[
- _statusBar,
- Divider(
- height: 1,
- ),
- _info,
- ],
- ),
- ),
- ),
- );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement