# gsy_flutter_app **Repository Path**: Caile_admin/gsy_flutter_app ## Basic Information - **Project Name**: gsy_flutter_app - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-01-15 - **Last Updated**: 2024-01-22 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # gsy_flutter_app 模仿github项目 gsy_github_app_flutter,学习其中的知识 ## 使用到的框架 1.dio - 网络请求框架 2.shared_preferences - sp 3.fluttertoast - Toast控件 4.json_annotation、json_serializable、build_runner - JSON 创建代码的注释 序列化和反序列化,需要添加这三个 5. ## 开发流程 1.初始化工程 2.建了TabBar基础框架,测试了简单页面跳转 3.统一颜色背景 ## 知识点 1. 构造函数 构造函数如果不确定要不要传该参,在定义参数final int type时,传入?,如:final int? type, 可参考GSYTabBarWidget的构造函数 2. 方法返回,例如:lib/common/net/Address.dart里面的方法 (这太变态了) 方法放回可以不写返回参数类型,传参可以不标明参数类型 3. json序列化与反序列化: a. 先导入json_annotation、json_serializable、build_runner b. 生成实体如本项目中的User c. 根目录调用flutter pub run build_runner build,生成result.g.dart