# getx_learn
**Repository Path**: hzhaiw/getx_learn
## Basic Information
- **Project Name**: getx_learn
- **Description**: getx 的学习
- **Primary Language**: Unknown
- **License**: Not specified
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2024-07-18
- **Last Updated**: 2024-08-26
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# getx_learn
A new Flutter project.
## Getting Started
This project is a starting point for a Flutter application.
A few resources to get you started if this is your first Flutter project:
- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab)
- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook)
For help getting started with Flutter development, view the
[online documentation](https://docs.flutter.dev/), which offers tutorials,
samples, guidance on mobile development, and a full API reference.
一、导航
使用 get create page:navigation_demo on 目录,进行创建 getx 页面,放到哪个页面的目录下,就会成为哪个页面的二级目录
1、导航方式-命名路由方式
Get.toNamed(""),例如:Get.toNamed("/index"),Get.toNamed("/index/home")
2、导航方式-具体类名称
Get.toNamed(具体对象),例如:Get.toNamed(IndexPage())
二、国际化
1、在根目录创建 /assets/locales 文件夹,例如:
D:\develop\Android\FlutterProjects\getx_learn\assets\locales
2、在 /assets/locales 创建语言的 json 文件
格式:语言_国家码.json ,例如:en_US.json、zh_CN.json
文件内容,如:
{
"hello": "Hello World"
}
3、在根目录(D:\develop\Android\FlutterProjects\getx_learn),执行 get generate locales assets/locales 生成多语言文件
输出目录: lib\\generated\\locales.g.dart
4、需要使用多语言的地方,使用 key.tr 就可以了,例如:"hello":"Hello World",就使用 "hello".tr
三、创建页面(bindings、controllers、views)
get create page:页面名称
例如:get create page:compose_demo
get create page:页面名称 on 页面创建在哪个页面下(就是页面的子路由)
例如: get create page:snackbar_demo on modules/compose_demo
Getx 的使用网址
https://juejin.cn/post/7087769888852279333#%E9%BB%98%E8%AE%A4%E9%85%8D%E7%BD%AE
一、通过网页,启动我们的app
https://www.bilibili.com/video/BV1UU4y1w71g/?spm_id_from=333.999.0.0&vd_source=e07cc8cc94eb22bd76722071b03cd199
文章:https://github.com/ducafecat/flutter_ducafecat_news_getx#%E9%87%87%E7%94%A8-scheme-%E6%96%B9%E5%BC%8F%E5%A4%96%E9%83%A8%E6%89%93%E5%BC%80-app
activity 和 intent
https://developer.android.com/codelabs/basic-android-kotlin-training-activities-intents?hl=zh-cn#0
1、android 的配置
android/app/src/main/AndroidManifest.xml
我的第一个段落。
hzhgetx://www.hzh.com/index 二、仿微信朋友圈demo https://www.bilibili.com/video/BV1g3411m7p4/?spm_id_from=333.788&vd_source=e07cc8cc94eb22bd76722071b03cd199 三、google 的iconfont https://fonts.google.com/icons https://ducafecat-pub.oss-cn-qingdao.aliyuncs.com/cover/5PcCDMWw.jpg?x-oss-process=image/resize,w_50,m_lfit