互联网公司面试官常问的问题,Flutter37,2024吊打面试官系列
);
}
}
profile_detail_page.dart
import ‘dart:convert’;
import ‘package:flutter/cupertino.dart’;
import ‘package:flutter/material.dart’;
import ‘package:flutterapp2/constants/Constants.dart’;
import ‘package:flutterapp2/models/user_info.dart’;
import ‘package:flutterapp2/utils/data_utils.dart’;
import ‘package:flutterapp2/utils/net_utils.dart’;
/**
- 用户详情界面
*/
class ProfileDetailPage extends StatefulWidget {
@override
_ProfileDetailPageState createState() => _ProfileDetailPageState();
}
class _ProfileDetailPageState extends State {
UserInfo _userInfo;
//获取用户信息
_getDetailInfo() {
DataUtils.getAccessToken().then((accessToken) {
//Debug accessToken: 21b8d7d0-6bef-469f-ba64-033d47387d50
print(‘Debug accessToken: $accessToken’);
//拼装请求
Map<String, dynamic> params = Map<String, dynamic>();
params[‘dataType’] = ‘json’;
params[‘access_token’] = accessToken;
NetUtils.get(AppUrls.MY_INFORMATION, params).then((data) {
// {“gender”:1,“joinTime”:“2014-09-03 10:01:47”,“city”:“长沙”,“fansCount”:0,“portrait”:“https://www.oschina.net/img/portrait.gif”,“expertise”:[“手机软件开发”,“软件开发管理”],“platforms”:[“Android”,“C/C++”],“uid”:2006874,“lastLoginTime”:“2019-04-09 22:33:03”,“province”:“湖南”,“name”:“Damon2019”,“followersCount”:0,“favoriteCount”:0,“notice”:{“referCount”:0,“replyCount”:0,“msgCount”:0,“fansCount”:0}}
//Debug MY_INFORMATION: {“gender”:1,“joinTime”:“2020-06-30 01:45:04”,“city”:“深圳”,“fansCount”:0,“portrait”:“https://static.oschina.net/uploads/user/2285/4571926_50.jpg?t=1593452705000”,“expertise”:[],“platforms”:[],“uid”:4571926,“lastLoginTime”:“2020-10-09 01:43:08”,“province”:“广东”,“name”:“Augfun”,“followersCount”:0,“favoriteCount”:0,“notice”:{“referCount”:0,“replyCount”:0,“msgCount”:1,“fansCount”:0}
print(‘Debug MY_INFORMATION: $data’);
if (data != null && data.isNotEmpty) {
Map<String, dynamic> map = json.decode(data);
UserInfo userInfo = UserInfo();
userInfo.uid = map[‘uid’];
userInfo.name = map[‘name’];
userInfo.gender = map[‘gender’];
userInfo.province = map[‘province’];
userInfo.city = map[‘city’];
userInfo.platforms = map[‘platforms’];
userInfo.expertise = map[‘expertise’];
userInfo.joinTime = map[‘joinTime’];
userInfo.lastLoginTime = map[‘lastLoginTime’];
userInfo.portrait = map[‘portrait’];
userInfo.fansCount = map[‘fansCount’];
userInfo.favoriteCount = map[‘favoriteCount’];
userInfo.followersCount = map[‘followersCount’];
userInfo.notice = map[‘notice’];
//刷新用户信息
setState(() {
_userInfo = userInfo;
});
}
});
});
}
@override
void initState() {
super.initState();
_getDetailInfo();
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
elevation: 0.0,
title: Text(
‘我的资料’,
style: TextStyle(
color: Color(AppColors.APPBAR),
),
),
iconTheme: IconThemeData(color: Color(AppColors.APPBAR)),
),
body: buildSingleChildScrollView(),
);
}
Widget buildSingleChildScrollView() {
return SingleChildScrollView(
child: _userInfo == null
? Center(
child: CupertinoActivityIndicator(),
-
)
- Column(
children: [
InkWell(
onTap: () {
//TODO
},
child: Container(
margin: const EdgeInsets.only(left: 20.0),
padding: const EdgeInsets.only(
top: 10.0, bottom: 10.0, right: 20.0),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
‘头像’,
style: TextStyle(fontSize: 20.0),
),
Container(
width: 60.0,
height: 60.0,
decoration: BoxDecoration(
shape: BoxShape.circle,
border: Border.all(
color: Colors.white,
width: 2.0,
),
image: DecorationImage(
image: NetworkImage(_userInfo.portrait),
fit: BoxFit.cover,
),
),
)
],
),
),
),
Divider(),
InkWell(
onTap: () {
//TODO
},
child: Container(
margin: const EdgeInsets.only(left: 20.0),
padding: const EdgeInsets.only(
top: 10.0, bottom: 10.0, right: 20.0),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
‘昵称’,
style: TextStyle(fontSize: 20.0),
),
Text(
_userInfo.name,
style: TextStyle(fontSize: 20.0),
),
],
),
),
),
Divider(),
Container(
margin: const EdgeInsets.only(left: 20.0),
padding: const EdgeInsets.only(
top: 10.0, bottom: 10.0, right: 20.0),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
‘加入时间’,
style: TextStyle(fontSize: 20.0),
),
Text(
_userInfo.joinTime,
// _userInfo.joinTime.split(’ ')[0],
style: TextStyle(fontSize: 20.0),
),
],
),
),
Divider(),
InkWell(
onTap: () {
//TODO
},
child: Container(
margin: const EdgeInsets.only(left: 20.0),
padding: const EdgeInsets.only(
top: 10.0, bottom: 10.0, right: 20.0),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
‘所在地区’,
style: TextStyle(fontSize: 20.0),
),
Text(
_userInfo.city,
style: TextStyle(fontSize: 20.0),
),
],
),
),
),
Divider(),
InkWell(
onTap: () {
//TODO
},
child: Container(
margin: const EdgeInsets.only(left: 20.0),
padding: const EdgeInsets.only(
top: 10.0, bottom: 10.0, right: 20.0),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Padding(
padding: const EdgeInsets.only(right: 20.0),
自我介绍一下,小编13年上海交大毕业,曾经在小公司待过,也去过华为、OPPO等大厂,18年进入阿里一直到现在。
深知大多数Android工程师,想要提升技能,往往是自己摸索成长或者是报班学习,但对于培训机构动则几千的学费,着实压力不小。自己不成体系的自学效果低效又漫长,而且极易碰到天花板技术停滞不前!
因此收集整理了一份《2024年Android移动开发全套学习资料》,初衷也很简单,就是希望能够帮助到想自学提升又不知道该从何学起的朋友,同时减轻大家的负担。






既有适合小白学习的零基础资料,也有适合3年以上经验的小伙伴深入学习提升的进阶课程,基本涵盖了95%以上Android开发知识点,真正体系化!
由于文件比较大,这里只是将部分目录大纲截图出来,每个节点里面都包含大厂面经、学习笔记、源码讲义、实战项目、讲解视频,并且后续会持续更新
如果你觉得这些内容对你有帮助,可以添加V获取:vip204888 (备注Android)
最后
对于程序员来说,要学习的知识内容、技术有太多太多,要想不被环境淘汰就只有不断提升自己,从来都是我们去适应环境,而不是环境来适应我们!
最后,我再重复一次,如果你想成为一个优秀的 Android 开发人员,请集中精力,对基础和重要的事情做深度研究。
对于很多初中级Android工程师而言,想要提升技能,往往是自己摸索成长,不成体系的学习效果低效漫长且无助。整理的这些架构技术希望对Android开发的朋友们有所参考以及少走弯路,本文的重点是你有没有收获与成长,其余的都不重要,希望读者们能谨记这一点。
为了大家能够顺利进阶中高级、架构师,我特地为大家准备了一套高手学习的源码和框架视频等精品Android架构师教程,保证你学了以后保证薪资上升一个台阶。
以下是今天给大家分享的一些独家干货:

一个人可以走的很快,但一群人才能走的更远。如果你从事以下工作或对以下感兴趣,欢迎戳这里加入程序员的圈子,让我们一起学习成长!
AI人工智能、Android移动开发、AIGC大模型、C C#、Go语言、Java、Linux运维、云计算、MySQL、PMP、网络安全、Python爬虫、UE5、UI设计、Unity3D、Web前端开发、产品经理、车载开发、大数据、鸿蒙、计算机网络、嵌入式物联网、软件测试、数据结构与算法、音视频开发、Flutter、IOS开发、PHP开发、.NET、安卓逆向、云计算
保证你学了以后保证薪资上升一个台阶。
以下是今天给大家分享的一些独家干货:
[外链图片转存中…(img-BCUUvF2B-1712472240982)]
一个人可以走的很快,但一群人才能走的更远。如果你从事以下工作或对以下感兴趣,欢迎戳这里加入程序员的圈子,让我们一起学习成长!
AI人工智能、Android移动开发、AIGC大模型、C C#、Go语言、Java、Linux运维、云计算、MySQL、PMP、网络安全、Python爬虫、UE5、UI设计、Unity3D、Web前端开发、产品经理、车载开发、大数据、鸿蒙、计算机网络、嵌入式物联网、软件测试、数据结构与算法、音视频开发、Flutter、IOS开发、PHP开发、.NET、安卓逆向、云计算
更多推荐



所有评论(0)