flutter模仿boss直聘客户端效果

2023-10-14 03:59

本文主要是介绍flutter模仿boss直聘客户端效果,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

效果图:

WX20200426-183846.png

WX20200426-183920.png

WX20200426-183935.png

WX20200426-183947.png

WX20200426-183956.png

前言:

各位同学大家好 boss直聘APP相信大家都用过吧, 今天给大家带来一个开源项目模仿了boss直聘中的一些经典页面的实现 希望能帮助到各位flutter。原生安卓 iOS 实现都比较的简单我这里就不展开讲,今天主要讲解flutter版本如何实现 废话不多说我正式开始 。

准备工作:

安装flutter环境 如果只是跑安卓设备 win系统就行了 要是同时运行安卓和iOS 就需要mac电脑了 配置环境变量这边就不展开讲了大家可以看我之前的文章
###需要用到的三方库
dio: ^3.0.9 网络请求库
toast: ^0.1.5 toast 库
flutter_swiper: ^1.1.6 轮播图库

具体代码实现

1欢迎页面就做了一个3秒的倒计时然后跳转到首页

import 'dart:async';
import 'package:flutter/material.dart';
import 'routes/Routes.dart';/*** 创建人:xuqing* 创建时间:2020年3月28日20:34:48* * */void main() => runApp(new App());class App extends StatelessWidget {@overrideWidget build(BuildContext context) {return new MaterialApp(onGenerateRoute:onGenerateRoute,theme: new ThemeData(primaryIconTheme: const IconThemeData(color: Colors.white),brightness: Brightness.light,primaryColor: new Color.fromARGB(255, 0, 215, 198),accentColor: Colors.cyan[300],),home: Scaffold(body:   MainPage(),)// home: new MainPage(title: 'Boss直聘'),);}
}class MainPage extends StatefulWidget {MainPage({Key key}) : super(key: key);@override_MainPageState createState() {return _MainPageState();}
}class _MainPageState extends State<MainPage> {@overridevoid initState() {super.initState();int count = 0;const period = const Duration(seconds: 1);print('currentTime='+DateTime.now().toString());Timer.periodic(period, (timer) {//到时回调print('afterTimer='+DateTime.now().toString());count++;if (count >= 3) {//取消定时器,避免无限回调timer.cancel();timer = null;toLoing();}});}@overridevoid dispose() {super.dispose();}void  toLoing()async{//Navigator.pushNamed(context, "/my");Navigator.of(context).pushNamedAndRemoveUntil("/my", ModalRoute.withName("/my"));}@overrideWidget build(BuildContext context) {// TODO: implement buildreturn Container(color: Colors.green,child: Center(child: Text("BOSS 直聘",style: TextStyle(fontSize: 30,color: Colors.white),),),);}}

这里的跳转我们要用

  Navigator.of(context).pushNamedAndRemoveUntil("/my", ModalRoute.withName("/my"));

这种路由跳转来清除所有的 widget 这样我们在回退到主页再次点击返回键就能退出正app

然后是主页的代码的实现

import 'package:flutter/material.dart';
import 'pages/chat_page.dart';
import 'pages/company_page.dart';
import 'pages/mine_page.dart';
import 'pages/job_page.dart';
import 'layout_type.dart';class My extends StatefulWidget {My({Key key, this.title}) : super(key: key);final String title;@override_MyState createState() => new _MyState();
}class _MyState extends State<My> {LayoutType _layoutSelection = LayoutType.job;Color _colorTabMatching({LayoutType layoutSelection}) {return _layoutSelection == layoutSelection ? Colors.cyan[300] : Colors.grey;}BottomNavigationBarItem _buildItem({String icon, LayoutType layoutSelection}) {String text = layoutName(layoutSelection);return BottomNavigationBarItem(icon: new Image.asset(icon,width: 35.0,height: 35.0,),title: Text(text,style: TextStyle(color: _colorTabMatching(layoutSelection: layoutSelection),),),);}Widget _buildButtonNavBar() {return BottomNavigationBar(type: BottomNavigationBarType.fixed,items: [_buildItem(icon: _layoutSelection == LayoutType.job? "images/ic_main_tab_find_pre.png": "images/ic_main_tab_find_nor.png",layoutSelection: LayoutType.job),_buildItem(icon: _layoutSelection == LayoutType.company? "images/ic_main_tab_company_pre.png": "images/ic_main_tab_company_nor.png",layoutSelection: LayoutType.company),_buildItem(icon: _layoutSelection == LayoutType.chat? "images/ic_main_tab_contacts_pre.png": "images/ic_main_tab_contacts_nor.png",layoutSelection: LayoutType.chat),_buildItem(icon: _layoutSelection == LayoutType.mine? "images/ic_main_tab_my_pre.png": "images/ic_main_tab_my_nor.png",layoutSelection: LayoutType.mine),],onTap: _onSelectTab,);}void _onLayoutSelected(LayoutType selection) {setState(() {_layoutSelection = selection;});}void _onSelectTab(int index) {switch (index) {case 0:_onLayoutSelected(LayoutType.job);break;case 1:_onLayoutSelected(LayoutType.company);break;case 2:_onLayoutSelected(LayoutType.chat);break;case 3:_onLayoutSelected(LayoutType.mine);break;}}Widget _buildBody() {LayoutType layoutSelection = _layoutSelection;switch (layoutSelection) {case LayoutType.job:return JobPage();case LayoutType.company:return CompanyPage();case LayoutType.chat:return ChatPage();case LayoutType.mine:return MinePage();}}@overrideWidget build(BuildContext context) {return new Scaffold(body: _buildBody(),bottomNavigationBar: _buildButtonNavBar(),);}
}

我们通过 BottomNavigationBar 来做底部的tab的切换 图片资源存放在assets 下面的images 目录下(没有此目录需要自己创建)
QQ20200428-115512.png

在body组件这里来添加对应的要显示的widget (包括首页 职位 公司 消息 我的 )

  Widget _buildBody() {LayoutType layoutSelection = _layoutSelection;switch (layoutSelection) {case LayoutType.job:return JobPage();case LayoutType.company:return CompanyPage();case LayoutType.chat:return ChatPage();case LayoutType.mine:return MinePage();}}@overrideWidget build(BuildContext context) {return new Scaffold(body: _buildBody(),bottomNavigationBar: _buildButtonNavBar(),);}
}

到此就实现了主要的tab切换 和widget 页面的加载
然后我们对各个页面你的widget 的UI布局和数据获取的的实现进行讲解说明
职位模块 具体代码实现


import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import '../bean/positioninfo.dart';
import '../network/servicepath.dart';
import '../utils/ToastUtil.dart';
/***
*
* 创建人:xuqing
* 创建时间:2020年3月9日00:40:10
* 类说明:职位
*
*/
class JobPage extends StatefulWidget {JobPage({Key key}) : super(key: key);@override_JobPageState createState() {return _JobPageState();}
}
class _JobPageState extends State<JobPage> {List  _getdata=[];Data  data=null ;@overridevoid initState() {super.initState();getInfo();}@overridevoid dispose() {super.dispose();}void   getInfo() async {getPositionInfo().then((value){setState(() {PositionInfo positionInfo=value;String  msg=positionInfo.msg;int code =positionInfo.code;if(code==200){_getdata=positionInfo.data;print(_getdata);ToastUtil.showinfo(context, msg);}else{ToastUtil.showinfo(context, msg);}});});}@overrideWidget build(BuildContext context) {// TODO: implement buildreturn  Scaffold(appBar: AppBar(title: Text("职位",style:TextStyle(color: Colors.white,fontSize: 20),),centerTitle: true,),body: Container(child: new ListView.builder(itemCount: (_getdata == null) ? 0 : _getdata.length,itemBuilder: (BuildContext context , int position){/* data=_getdata[position];return  JobList(data);*/return getItem(position);//getItem(position);}),),);}Widget  getItem(int index){data=_getdata[index];return  new Padding(padding: EdgeInsets.only(top: 3.0,left: 5.0,right: 5.0,bottom: 3.0),child: new SizedBox(child: Card(elevation: 0.0,child: Row(crossAxisAlignment: CrossAxisAlignment.start,children: <Widget>[new Expanded(child: new Column(crossAxisAlignment: CrossAxisAlignment.start,mainAxisSize: MainAxisSize.min,children: <Widget>[new  Row(children: <Widget>[new Padding(padding: EdgeInsets.only(top: 10.0,left: 10.0,bottom: 5.0),child: new Text(data.name),),new Expanded(child:Column(crossAxisAlignment: CrossAxisAlignment.end,children: <Widget>[new Padding(padding: EdgeInsets.only(right: 10.0),child:  Text(data.salary,style: TextStyle(color: Colors.red),),)],)),],),new Container(child: new Text(data.name+data.size,textAlign: TextAlign.left,style: new TextStyle(fontSize: 20.0,color: Colors.grey),),margin: EdgeInsets.only(top: 5.0,left: 10.0,bottom: 5.0),),new  Divider(),new Row(children: <Widget>[new Padding(padding: EdgeInsets.only(top: 5.0,left: 10.0,right: 5.0,bottom: 15.0,),child: new Text(data.username+"|"+data.title,style: TextStyle(color: new Color.fromARGB(255, 0, 215, 198)),),)],)],)),],),),),);}
}

主要实现就是listview列表组件加载item item里面是嵌套了Card 组件在在外层里面分别人在用Row组件嵌套
Column 组件来实现这个item的布局

网络请求的封装

import 'package:bosszhiping_tab/bean/messageinfo.dart';
import 'package:dio/dio.dart';
import '../config/api.dart';
import '../bean/positioninfo.dart';
import '../bean/companyinfo.dart';
import '../bean/companydetails.dart';
import '../bean/back_info.dart';
/***  获取主页数据***/
Future   getPositionInfo()async{try{Dio  dio=new Dio();Response res= await dio.get(Api.POSITIONINFO);PositionInfo positionInfo=PositionInfo.fromJson(res.data);print(res.data.toString());return positionInfo;}catch(e){return print(e);}
}
/*** 获取消息数据***/
Future getmessageinfo() async{try{Dio dio=new Dio();Response response=await dio.get(Api.MESSAGEINFO);MessageInfo messageInfo=MessageInfo.fromJson(response.data);print(response.data.toString());return messageInfo;}catch(e){return print(e);}
}/**** 获取公司信息数据**/
Future getcompanyInfo()async{try{Dio dio=new Dio();Response response=await dio.get(Api.COMPANY_INFO);Company companyInfo=Company.fromJson(response.data);print(response.data.toString());return companyInfo;}catch(e){return print(e);}
}
/***** 公司详细信息***/
Future  getcomanydetails(var data)async{try{Dio dio=new Dio();Response response=await dio.get(Api.COMPAN_DETAILS,queryParameters: data);print("comdetails  ----- >   "+response.data.toString());Comdetails  comdetails=Comdetails.fromJson(response.data);return comdetails;}catch(e){print(e);}
}/***** 提交职位信息**/
Future  addPositionInfo(var data)async{try{Dio dio=new Dio();Response response=await dio.post(Api.ADD_POSITION_INFO,queryParameters: data);print(response.data);BackInfo  backInfo=BackInfo.fromJson(response.data);return backInfo;}catch(e){print(e);}
}

网络请求方法的调用

void initState() {super.initState();getInfo();}@overridevoid dispose() {super.dispose();}void   getInfo() async {getPositionInfo().then((value){setState(() {PositionInfo positionInfo=value;String  msg=positionInfo.msg;int code =positionInfo.code;if(code==200){_getdata=positionInfo.data;print(_getdata);ToastUtil.showinfo(context, msg);}else{ToastUtil.showinfo(context, msg);}});});}

然后我们刷新数据 显示在listview的item组件里面的就OK了
剩下的一些界面我就把代码贴出来给大家看看篇幅是太长了
公司模块 具体代码实现

import 'package:flutter/material.dart';
import '../bean/companyinfo.dart';
import '../network/servicepath.dart';
import '../utils/ToastUtil.dart';
import 'company/company_details.dart';
/**** 创建人:xuqing* 创建时间:* 类说明:公司信息****/
class CompanyPage extends StatefulWidget {CompanyPage({Key key}) : super(key: key);@override_CompanyPageState createState() {return _CompanyPageState();}
}
class _CompanyPageState extends State<CompanyPage> {List getdata;Data  _data=null;@overridevoid initState() {super.initState();getcompanyinfo();}void   getcompanyinfo(){getcompanyInfo().then((value){setState(() {Company company=value;String  msg=company.msg;int code=company.code;if(code==200){getdata=company.data;ToastUtil.showinfo(context, msg);}else{ToastUtil.showinfo(context, msg);}});});}@overridevoid dispose() {super.dispose();}@overrideWidget build(BuildContext context) {// TODO: implement buildreturn Scaffold(appBar: AppBar(title: Text("公司",style:TextStyle(color: Colors.white,fontSize: 20),),centerTitle: true,),body: Container(child: ListView.builder(//itemCount: 3,itemCount: (getdata==null)?0:getdata.length,itemBuilder: (BuildContext context, int position){return  getItem(position);}),),);}//公司信息 item 布局Widget  getItem(int index){_data =getdata[index];print(_data.hot);return  GestureDetector(child: new Padding(padding: const EdgeInsets.only(top: 3.0,left: 5.0,right: 5.0,bottom: 3.0),child: SizedBox(child: new  Card(elevation: 0.0,child: Row(crossAxisAlignment: CrossAxisAlignment.start,children: <Widget>[new Padding(padding: const EdgeInsets.only(top: 10.0,left: 15.0,right: 15.0,bottom: 0.0),child: Image.network(_data.logo,width: 50.0,height: 100.0,),),Expanded(child:Column(crossAxisAlignment: CrossAxisAlignment.start,mainAxisSize: MainAxisSize.min,children: <Widget>[new Container(child: Text(_data.name,textAlign: TextAlign.left,style: TextStyle(fontSize: 15.0,),),margin: const EdgeInsets.only(top: 10.0,bottom: 5.0),),new Padding(padding: const EdgeInsets.only(top: 5.0,left: 0.0,right: 5.0,bottom: 5.0,),child: Text(_data.location,style: TextStyle(fontSize: 13.0,color: Colors.grey),),),new Padding(padding: const EdgeInsets.only(top: 5.0,left: 0.0,right: 5.0,bottom: 5.0,),child: Text(_data.type+"|"+_data.size+"|"+_data.employee,style: TextStyle(fontSize: 13.0,color: Colors.grey),),),new  Divider(height: 2.0,color: Colors.black54,),Row(children: <Widget>[new Padding(padding: const EdgeInsets.only(top: 5.0,left: 0.0,right: 5.0,bottom: 15.0),child: Text("热招"+_data.hot+"等"+_data.count+"个职位",style: TextStyle(fontSize: 13.0,color: Colors.grey),),),new Expanded(child: Column(crossAxisAlignment: CrossAxisAlignment.end,children: <Widget>[new Padding(padding: const  EdgeInsets.only(bottom: 8.0),child:  const Icon(Icons.keyboard_arrow_right,color: Colors.grey,),)],))],)],)),],),),),),onTap: (){setState(() {onItemclick(index);});},);}void  onItemclick(int  index){_data =getdata[index];print("获取到的头ID"+_data.id.toString());Navigator.of(context).pushNamed("company_details" ,arguments: {"id":_data.id});}
}

消息模块 具体代码实现

import 'package:flutter/material.dart';
import '../network/servicepath.dart';
import '../bean/messageinfo.dart';
import '../utils/ToastUtil.dart';
/**** 创建人:xuqing* 创建时间:2020年3月15日22:55:51* 类说明:消息模块***/
class ChatPage extends StatefulWidget {ChatPage({Key key}) : super(key: key);@override_ChatPageState createState() {return _ChatPageState();}
}class _ChatPageState extends State<ChatPage> {List getdata=[];Data _data=null;@overridevoid initState() {super.initState();getMessageInfo();}void  getMessageInfo()async{getmessageinfo().then((value){setState(() {MessageInfo messageInfo=value;String msg=messageInfo.msg;int code=messageInfo.code;if(code==200){getdata=messageInfo.data;ToastUtil.showinfo(context, msg);}else{ToastUtil.showinfo(context, msg);}});});}@overridevoid dispose() {super.dispose();}@overrideWidget build(BuildContext context) {// TODO: implement buildreturn Scaffold(appBar: AppBar(title: Text("消息",style:TextStyle(color: Colors.white,fontSize: 20),),centerTitle: true,),body: Container(child:new  ListView.builder(itemCount:(getdata == null)?0:getdata.length,itemBuilder: (BuildContext context , int position){return getItem(position);}),),);}Widget  getItem(int index){_data=getdata[index];returnSizedBox(child: Card(elevation: 0.0,child: Column(children: <Widget>[Row(children: <Widget>[Container(padding: EdgeInsets.only(left: 20),child: ClipOval(child: Image.network(_data.headportraiturl,height: 40,width: 40,fit: BoxFit.cover,),),),Expanded(child: Column(crossAxisAlignment: CrossAxisAlignment.start,children: <Widget>[new Container(child: new Text(_data.nickname,textAlign: TextAlign.left,style: new TextStyle(fontSize: 18.0,color: Colors.black),),margin: EdgeInsets.only(top: 2.0,left: 10.0,bottom: 2.0),),new Container(child: new Text(_data.companyname+"|"+_data.jobname,textAlign: TextAlign.left,style: new TextStyle(fontSize: 15.0,color: Colors.grey),),margin: EdgeInsets.only(top: 2.0,left: 10.0,bottom: 2.0),),new Container(child: new Text(_data.msg,textAlign: TextAlign.left,style: new TextStyle(fontSize: 12.0,color: Colors.grey),),margin: EdgeInsets.only(top: 2.0,left: 10.0,bottom: 2.0),),],),)],),new Padding(padding: const EdgeInsets.only(left: 5.0,right: 5.0),child: new Divider(height: 2.0,color: Colors.black54,),)],),),);Container(child: new Padding(padding: EdgeInsets.only(left: 2.0,right: 2.0,),child: SizedBox(child: Column(children: <Widget>[Row(children: <Widget>[Container(padding: EdgeInsets.only(left: 20),child: ClipOval(child: Image.network(_data.headportraiturl,height: 40,width: 40,fit: BoxFit.cover,),),),Expanded(child: Column(crossAxisAlignment: CrossAxisAlignment.start,children: <Widget>[new Container(child: new Text(_data.nickname,textAlign: TextAlign.left,style: new TextStyle(fontSize: 18.0,color: Colors.black),),margin: EdgeInsets.only(top: 2.0,left: 10.0,bottom: 2.0),),new Container(child: new Text(_data.companyname+"|"+_data.jobname,textAlign: TextAlign.left,style: new TextStyle(fontSize: 15.0,color: Colors.grey),),margin: EdgeInsets.only(top: 2.0,left: 10.0,bottom: 2.0),),new Container(child: new Text(_data.msg,textAlign: TextAlign.left,style: new TextStyle(fontSize: 12.0,color: Colors.grey),),margin: EdgeInsets.only(top: 2.0,left: 10.0,bottom: 2.0),),],),)],),new Padding(padding: const EdgeInsets.only(left: 5.0,right: 5.0),child: new Divider(height: 2.0,color: Colors.black54,),)],),/*   child: Card(elevation: 0.0,),*/),));}
}

个人中心(我的模块)具体代码实现

import 'package:flutter/material.dart';
import 'package:bosszhiping_tab/mywiget/menu_item.dart';
import 'package:bosszhiping_tab/mywiget/contact_item.dart';class MinePage extends StatefulWidget {MinePage({Key key}) : super(key: key);@override_MinePageState createState() {return _MinePageState();}
}class _MinePageState extends State<MinePage> {final double _appBarHeight = 180.0;final String _userHead ='https://img.bosszhipin.com/beijin/mcs/useravatar/20171211/4d147d8bb3e2a3478e20b50ad614f4d02062e3aec7ce2519b427d24a3f300d68_s.jpg';@overridevoid initState() {super.initState();}@overridevoid dispose() {super.dispose();}@overrideWidget build(BuildContext context) {// TODO: implement buildreturn new Scaffold(backgroundColor: new Color.fromARGB(255, 242, 242, 245),body: new CustomScrollView(slivers: <Widget>[new SliverAppBar(expandedHeight: _appBarHeight,flexibleSpace: new FlexibleSpaceBar(collapseMode: CollapseMode.parallax,background: new Stack(fit: StackFit.expand,children: <Widget>[const DecoratedBox(decoration: const BoxDecoration(gradient: const LinearGradient(begin: const Alignment(0.0, -1.0),end: const Alignment(0.0, -0.4),colors: const <Color>[const Color(0x00000000),const Color(0x00000000)],),),),new Row(mainAxisAlignment: MainAxisAlignment.start,children: [new Expanded(flex: 3,child: new Column(mainAxisAlignment: MainAxisAlignment.center,crossAxisAlignment: CrossAxisAlignment.start,children: [new Padding(padding: const EdgeInsets.only(top: 30.0,left: 30.0,bottom: 15.0,),child: new Text('Rei Ki',style: new TextStyle(color: Colors.white,fontWeight: FontWeight.bold,fontSize: 35.0),),),new Padding(padding: const EdgeInsets.only(left: 30.0,),child: new Text('在职-不考虑机会',style: new TextStyle(color: Colors.white, fontSize: 15.0),),),],),),new Expanded(flex: 1,child: new Padding(padding: const EdgeInsets.only(top: 40.0,right: 30.0,),child: new CircleAvatar(radius: 35.0,backgroundImage: new NetworkImage(_userHead),),),)],),],),),),new SliverList(delegate: new SliverChildListDelegate(<Widget>[new Container(color: Colors.white,child: new Padding(padding: const EdgeInsets.only(top: 10.0,bottom: 10.0,),child: new Row(mainAxisAlignment: MainAxisAlignment.spaceAround,children: [new ContactItem(count: '696',title: '沟通过',),new ContactItem(count: '0',title: '面试',),new ContactItem(count: '71',title: '已投递',),new ContactItem(count: '53',title: '感兴趣',),],),),),new Container(color: Colors.white,margin: const EdgeInsets.only(top: 10.0,bottom: 20),child: Column(children: <Widget>[new MenuItem(icon: Icons.face,title: '体验新版本',onPressed: (){print("体验新版本  ----   >");},),new MenuItem(icon: Icons.print,title: '我的微简历',),new MenuItem(icon: Icons.archive,title: '附件简历',),new MenuItem(icon: Icons.home,title: '管理求职意向',),new MenuItem(icon: Icons.title,title: '提升简历排名',),new MenuItem(icon: Icons.chat,title: '牛人问答',),new MenuItem(icon: Icons.assessment,title: '关注公司',),new MenuItem(icon: Icons.add_shopping_cart,title: '钱包',onPressed: (){Navigator.of(context).pushNamed("wallet");},),new MenuItem(icon: Icons.security,title: '隐私设置',),new MenuItem(icon: Icons.add,title: '添加职位信息',onPressed: (){Navigator.of(context).pushNamed("addpositioninfo");print("添加职位信息");},),],),),],),)],),);}
}

个人中心模块横向布局分封装

微信截图_20200205195042.png

import 'package:flutter/material.dart';
/****  创建人:xuqing*  创建时间:2020年2月5日18:30:50*  类说明:横向布局的  封装**/class ContactItem extends StatelessWidget {ContactItem({Key key, this.count, this.title, this.onPressed}): super(key: key);final String count;final String title;final VoidCallback onPressed;@overrideWidget build(BuildContext context) {return new GestureDetector(onTap: onPressed,child: new Column(children: [new Padding(padding: const EdgeInsets.only(bottom: 4.0,),child: new Text(count, style: new TextStyle(fontSize: 18.0)),),new Text(title,style: new TextStyle(color: Colors.black54, fontSize: 14.0)),],),);}
}

个人中心纵向布局的封装

微信截图_20200205200815.png

import 'package:flutter/material.dart';/**
* 创建人:xuqing
* 创建时间 :2020年2月4日21:39:42
* 类说明:纵向不布局的封装
*
*/class MenuItem extends StatelessWidget {final IconData icon;final String title;final VoidCallback onPressed;MenuItem({Key key, this.icon, this.title, this.onPressed}) : super(key: key);@overrideWidget build(BuildContext context) {// TODO: implement buildreturn  new GestureDetector(onTap: onPressed,child:  new Column(children: <Widget>[new Padding(padding: EdgeInsets.only(left: 20.0,top: 12.0,right: 20.0,bottom: 10.0,),child: new Row(children: <Widget>[new Padding(padding: const EdgeInsets.only(right: 8.0,),child:new Icon(icon,color: Colors.black54,),),new Expanded(child: new Text(title,style: new TextStyle(color: Colors.black54,fontSize: 16.0),)),new Icon(Icons.chevron_right,color: Colors.grey,)],)),new Padding(padding: const EdgeInsets.only(left: 20.0,right: 20.0),child: new Divider(height: 2.0,color: Colors.black54,),)],),);}
}

还有公司详情页面 代码具体看源代码

最后总结:

整个学习的项目采用了mvc 架构模式去编写,后台接口返回的json数据通过格式化转成数据模型类来处理
对月各个分区模块也做了适当的代码分离使得嵌套多层的布局代码得到简化。我也是一个正在学习flutter框的码农希望我的项目能帮助到各位同学 以后我还会贡献更多有用的代码分享给大家。有兴趣的同学麻烦给关注和star 也可以加我个人QQ/微信(1693891473)
项目地址 (flutter ):https://github.com/xq19930522/flutter_bosstap
服务端地址(springboot): https://github.com/xq19930522/bosstabservice

QQ交流群:

在这里插入图片描述

这篇关于flutter模仿boss直聘客户端效果的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/207985

相关文章

Python手搓邮件发送客户端

《Python手搓邮件发送客户端》这篇文章主要为大家详细介绍了如何使用Python手搓邮件发送客户端,支持发送邮件,附件,定时发送以及个性化邮件正文,感兴趣的可以了解下... 目录1. 简介2.主要功能2.1.邮件发送功能2.2.个性签名功能2.3.定时发送功能2. 4.附件管理2.5.配置加载功能2.6.

Redis连接失败:客户端IP不在白名单中的问题分析与解决方案

《Redis连接失败:客户端IP不在白名单中的问题分析与解决方案》在现代分布式系统中,Redis作为一种高性能的内存数据库,被广泛应用于缓存、消息队列、会话存储等场景,然而,在实际使用过程中,我们可能... 目录一、问题背景二、错误分析1. 错误信息解读2. 根本原因三、解决方案1. 将客户端IP添加到Re

基于Python实现PDF动画翻页效果的阅读器

《基于Python实现PDF动画翻页效果的阅读器》在这篇博客中,我们将深入分析一个基于wxPython实现的PDF阅读器程序,该程序支持加载PDF文件并显示页面内容,同时支持页面切换动画效果,文中有详... 目录全部代码代码结构初始化 UI 界面加载 PDF 文件显示 PDF 页面页面切换动画运行效果总结主

React实现原生APP切换效果

《React实现原生APP切换效果》最近需要使用Hybrid的方式开发一个APP,交互和原生APP相似并且需要IM通信,本文给大家介绍了使用React实现原生APP切换效果,文中通过代码示例讲解的非常... 目录背景需求概览技术栈实现步骤根据 react-router-dom 文档配置好路由添加过渡动画使用

使用Python实现生命之轮Wheel of life效果

《使用Python实现生命之轮Wheeloflife效果》生命之轮Wheeloflife这一概念最初由SuccessMotivation®Institute,Inc.的创始人PaulJ.Meyer... 最近看一个生命之轮的视频,让我们珍惜时间,因为一生是有限的。使用python创建生命倒计时图表,珍惜时间

SpringBoot实现websocket服务端及客户端的详细过程

《SpringBoot实现websocket服务端及客户端的详细过程》文章介绍了WebSocket通信过程、服务端和客户端的实现,以及可能遇到的问题及解决方案,感兴趣的朋友一起看看吧... 目录一、WebSocket通信过程二、服务端实现1.pom文件添加依赖2.启用Springboot对WebSocket

QT实现TCP客户端自动连接

《QT实现TCP客户端自动连接》这篇文章主要为大家详细介绍了QT中一个TCP客户端自动连接的测试模型,文中的示例代码讲解详细,感兴趣的小伙伴可以跟随小编一起学习一下... 目录版本 1:没有取消按钮 测试效果测试代码版本 2:有取消按钮测试效果测试代码版本 1:没有取消按钮 测试效果缺陷:无法手动停

鸿蒙开发搭建flutter适配的开发环境

《鸿蒙开发搭建flutter适配的开发环境》文章详细介绍了在Windows系统上如何创建和运行鸿蒙Flutter项目,包括使用flutterdoctor检测环境、创建项目、编译HAP包以及在真机上运... 目录环境搭建创建运行项目打包项目总结环境搭建1.安装 DevEco Studio NEXT IDE

Nacos客户端本地缓存和故障转移方式

《Nacos客户端本地缓存和故障转移方式》Nacos客户端在从Server获得服务时,若出现故障,会通过ServiceInfoHolder和FailoverReactor进行故障转移,ServiceI... 目录1. ServiceInfoHolder本地缓存目录2. FailoverReactorinit

防近视护眼台灯什么牌子好?五款防近视效果好的护眼台灯推荐

在家里,灯具是属于离不开的家具,每个大大小小的地方都需要的照亮,所以一盏好灯是必不可少的,每个发挥着作用。而护眼台灯就起了一个保护眼睛,预防近视的作用。可以保护我们在学习,阅读的时候提供一个合适的光线环境,保护我们的眼睛。防近视护眼台灯什么牌子好?那我们怎么选择一个优秀的护眼台灯也是很重要,才能起到最大的护眼效果。下面五款防近视效果好的护眼台灯推荐: 一:六个推荐防近视效果好的护眼台灯的