commit c5b41b207a6c3232a16f8042768fdfe4d96e35c0 Author: 胡天 Date: Fri Jul 14 16:55:36 2023 +0800 init diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..24476c5 --- /dev/null +++ b/.gitignore @@ -0,0 +1,44 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ +migrate_working_dir/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +**/doc/api/ +**/ios/Flutter/.last_build_id +.dart_tool/ +.flutter-plugins +.flutter-plugins-dependencies +.packages +.pub-cache/ +.pub/ +/build/ + +# Symbolication related +app.*.symbols + +# Obfuscation related +app.*.map.json + +# Android Studio will place build artifacts here +/android/app/debug +/android/app/profile +/android/app/release diff --git a/.metadata b/.metadata new file mode 100644 index 0000000..4175ce2 --- /dev/null +++ b/.metadata @@ -0,0 +1,36 @@ +# This file tracks properties of this Flutter project. +# Used by Flutter tool to assess capabilities and perform upgrades etc. +# +# This file should be version controlled. + +version: + revision: 1b7885ce1be1aaa567ebd60d3be09eb1c5da156a + channel: master + +project_type: app + +# Tracks metadata for the flutter migrate command +migration: + platforms: + - platform: root + create_revision: 1b7885ce1be1aaa567ebd60d3be09eb1c5da156a + base_revision: 1b7885ce1be1aaa567ebd60d3be09eb1c5da156a + - platform: android + create_revision: 1b7885ce1be1aaa567ebd60d3be09eb1c5da156a + base_revision: 1b7885ce1be1aaa567ebd60d3be09eb1c5da156a + - platform: ios + create_revision: 1b7885ce1be1aaa567ebd60d3be09eb1c5da156a + base_revision: 1b7885ce1be1aaa567ebd60d3be09eb1c5da156a + - platform: web + create_revision: 1b7885ce1be1aaa567ebd60d3be09eb1c5da156a + base_revision: 1b7885ce1be1aaa567ebd60d3be09eb1c5da156a + + # User provided section + + # List of Local paths (relative to this file) that should be + # ignored by the migrate tool. + # + # Files that are not part of the templates will be ignored by default. + unmanaged_files: + - 'lib/main.dart' + - 'ios/Runner.xcodeproj/project.pbxproj' diff --git a/README.md b/README.md new file mode 100644 index 0000000..4cb1e8c --- /dev/null +++ b/README.md @@ -0,0 +1,16 @@ +# news_getx + +基于猫哥的开源代码进行学习,好像是学的第二次了。 + +## 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. diff --git a/analysis_options.yaml b/analysis_options.yaml new file mode 100644 index 0000000..5940dd5 --- /dev/null +++ b/analysis_options.yaml @@ -0,0 +1,35 @@ +# This file configures the analyzer, which statically analyzes Dart code to +# check for errors, warnings, and lints. +# +# The issues identified by the analyzer are surfaced in the UI of Dart-enabled +# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be +# invoked from the command line by running `flutter analyze`. + +# The following line activates a set of recommended lints for Flutter apps, +# packages, and plugins designed to encourage good coding practices. +include: package:flutter_lints/flutter.yaml + +linter: + # The lint rules applied to this project can be customized in the + # section below to disable rules from the `package:flutter_lints/flutter.yaml` + # included above or to enable additional rules. A list of all available lints + # and their documentation is published at + # https://dart-lang.github.io/linter/lints/index.html. + # + # Instead of disabling a lint rule for the entire project in the + # section below, it can also be suppressed for a single line of code + # or a specific dart file by using the `// ignore: name_of_lint` and + # `// ignore_for_file: name_of_lint` syntax on the line or in the file + # producing the lint. + rules: + prefer_const_constructors: false + prefer_final_fields: false + use_key_in_widget_constructors: false + prefer_const_literals_to_create_immutables: false + prefer_const_constructors_in_immutables: false + avoid_print: false + # avoid_print: false # Uncomment to disable the `avoid_print` rule + # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule + +# Additional information about this file can be found at +# https://dart.dev/guides/language/analysis-options diff --git a/android/.gitignore b/android/.gitignore new file mode 100644 index 0000000..6f56801 --- /dev/null +++ b/android/.gitignore @@ -0,0 +1,13 @@ +gradle-wrapper.jar +/.gradle +/captures/ +/gradlew +/gradlew.bat +/local.properties +GeneratedPluginRegistrant.java + +# Remember to never publicly share your keystore. +# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app +key.properties +**/*.keystore +**/*.jks diff --git a/android/app/build.gradle b/android/app/build.gradle new file mode 100644 index 0000000..1c7c561 --- /dev/null +++ b/android/app/build.gradle @@ -0,0 +1,60 @@ +def localProperties = new Properties() +def localPropertiesFile = rootProject.file('local.properties') +if (localPropertiesFile.exists()) { + localPropertiesFile.withReader('UTF-8') { reader -> + localProperties.load(reader) + } +} + +def flutterRoot = localProperties.getProperty('flutter.sdk') +if (flutterRoot == null) { + throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") +} + +def flutterVersionCode = localProperties.getProperty('flutter.versionCode') +if (flutterVersionCode == null) { + flutterVersionCode = '1' +} + +def flutterVersionName = localProperties.getProperty('flutter.versionName') +if (flutterVersionName == null) { + flutterVersionName = '1.0' +} + +apply plugin: 'com.android.application' +apply plugin: 'kotlin-android' +apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" + +android { + compileSdkVersion flutter.compileSdkVersion + ndkVersion flutter.ndkVersion + + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + + defaultConfig { + // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). + applicationId "com.example.news_getx" + // You can update the following values to match your application needs. + // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. +// minSdkVersion flutter.minSdkVersion + minSdkVersion 19 + targetSdkVersion flutter.targetSdkVersion + versionCode flutterVersionCode.toInteger() + versionName flutterVersionName + } + + buildTypes { + release { + // TODO: Add your own signing config for the release build. + // Signing with the debug keys for now, so `flutter run --release` works. + signingConfig signingConfigs.debug + } + } +} + +flutter { + source '../..' +} diff --git a/android/app/src/debug/AndroidManifest.xml b/android/app/src/debug/AndroidManifest.xml new file mode 100644 index 0000000..f2eda5f --- /dev/null +++ b/android/app/src/debug/AndroidManifest.xml @@ -0,0 +1,8 @@ + + + + diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000..f3009cd --- /dev/null +++ b/android/app/src/main/AndroidManifest.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + diff --git a/android/app/src/main/java/com/example/news_getx/MainActivity.java b/android/app/src/main/java/com/example/news_getx/MainActivity.java new file mode 100644 index 0000000..e42c19f --- /dev/null +++ b/android/app/src/main/java/com/example/news_getx/MainActivity.java @@ -0,0 +1,6 @@ +package com.example.news_getx; + +import io.flutter.embedding.android.FlutterActivity; + +public class MainActivity extends FlutterActivity { +} diff --git a/android/app/src/main/res/drawable-v21/launch_background.xml b/android/app/src/main/res/drawable-v21/launch_background.xml new file mode 100644 index 0000000..f74085f --- /dev/null +++ b/android/app/src/main/res/drawable-v21/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/android/app/src/main/res/drawable/launch_background.xml b/android/app/src/main/res/drawable/launch_background.xml new file mode 100644 index 0000000..304732f --- /dev/null +++ b/android/app/src/main/res/drawable/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 0000000..db77bb4 Binary files /dev/null and b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 0000000..17987b7 Binary files /dev/null and b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 0000000..09d4391 Binary files /dev/null and b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 0000000..d5f1c8d Binary files /dev/null and b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 0000000..4d6372e Binary files /dev/null and b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/values-night/styles.xml b/android/app/src/main/res/values-night/styles.xml new file mode 100644 index 0000000..06952be --- /dev/null +++ b/android/app/src/main/res/values-night/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/android/app/src/main/res/values/styles.xml b/android/app/src/main/res/values/styles.xml new file mode 100644 index 0000000..cb1ef88 --- /dev/null +++ b/android/app/src/main/res/values/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/android/app/src/profile/AndroidManifest.xml b/android/app/src/profile/AndroidManifest.xml new file mode 100644 index 0000000..f2eda5f --- /dev/null +++ b/android/app/src/profile/AndroidManifest.xml @@ -0,0 +1,8 @@ + + + + diff --git a/android/build.gradle b/android/build.gradle new file mode 100644 index 0000000..e50c3a0 --- /dev/null +++ b/android/build.gradle @@ -0,0 +1,31 @@ +buildscript { + ext.kotlin_version = '1.7.10' + repositories { + google() + mavenCentral() + } + + dependencies { + classpath 'com.android.tools.build:gradle:7.3.0' + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" + } +} + +allprojects { + repositories { + google() + mavenCentral() + } +} + +rootProject.buildDir = '../build' +subprojects { + project.buildDir = "${rootProject.buildDir}/${project.name}" +} +subprojects { + project.evaluationDependsOn(':app') +} + +task clean(type: Delete) { + delete rootProject.buildDir +} diff --git a/android/gradle.properties b/android/gradle.properties new file mode 100644 index 0000000..6a7fcc5 --- /dev/null +++ b/android/gradle.properties @@ -0,0 +1,4 @@ +org.gradle.jvmargs=-Xmx1536M +android.useAndroidX=true +android.enableJetifier=true +#org.gradle.java.home=D\:\\Android\\Android Studio\\jbr \ No newline at end of file diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..3c472b9 --- /dev/null +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip diff --git a/android/settings.gradle b/android/settings.gradle new file mode 100644 index 0000000..44e62bc --- /dev/null +++ b/android/settings.gradle @@ -0,0 +1,11 @@ +include ':app' + +def localPropertiesFile = new File(rootProject.projectDir, "local.properties") +def properties = new Properties() + +assert localPropertiesFile.exists() +localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } + +def flutterSdkPath = properties.getProperty("flutter.sdk") +assert flutterSdkPath != null, "flutter.sdk not set in local.properties" +apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" diff --git a/assets/fonts/Avenir-Book.ttf b/assets/fonts/Avenir-Book.ttf new file mode 100644 index 0000000..ab9362f Binary files /dev/null and b/assets/fonts/Avenir-Book.ttf differ diff --git a/assets/fonts/Montserrat-Medium.ttf b/assets/fonts/Montserrat-Medium.ttf new file mode 100644 index 0000000..6e079f6 Binary files /dev/null and b/assets/fonts/Montserrat-Medium.ttf differ diff --git a/assets/fonts/Montserrat-SemiBold.ttf b/assets/fonts/Montserrat-SemiBold.ttf new file mode 100644 index 0000000..f8a43f2 Binary files /dev/null and b/assets/fonts/Montserrat-SemiBold.ttf differ diff --git a/assets/fonts/demo_index.html b/assets/fonts/demo_index.html new file mode 100644 index 0000000..ffbe09f --- /dev/null +++ b/assets/fonts/demo_index.html @@ -0,0 +1,469 @@ + + + + + IconFont Demo + + + + + + + + + + + +
+

+ +
+
+
    + +
  • + +
    share
    +
    
    +
  • + +
  • + +
    fav
    +
    
    +
  • + +
  • + +
    social-linkedin
    +
    
    +
  • + +
  • + +
    social-apple
    +
    
    +
  • + +
  • + +
    social-octocat
    +
    
    +
  • + +
  • + +
    social-reddit
    +
    
    +
  • + +
  • + +
    social-snapchat
    +
    
    +
  • + +
  • + +
    social-skype
    +
    
    +
  • + +
  • + +
    social-twitter
    +
    
    +
  • + +
  • + +
    me
    +
    
    +
  • + +
  • + +
    tag
    +
    
    +
  • + +
  • + +
    grid
    +
    
    +
  • + +
  • + +
    home
    +
    
    +
  • + +
+
+

Unicode 引用

+
+ +

Unicode 是字体在网页端最原始的应用方式,特点是:

+
    +
  • 兼容性最好,支持 IE6+,及所有现代浏览器。
  • +
  • 支持按字体的方式去动态调整图标大小,颜色等等。
  • +
  • 但是因为是字体,所以不支持多色。只能使用平台里单色的图标,就算项目里有多色图标也会自动去色。
  • +
+
+

注意:新版 iconfont 支持多色图标,这些多色图标在 Unicode 模式下将不能使用,如果有需求建议使用symbol 的引用方式

+
+

Unicode 使用步骤如下:

+

第一步:拷贝项目下面生成的 @font-face

+
@font-face {
+  font-family: 'iconfont';
+  src: url('iconfont.eot');
+  src: url('iconfont.eot?#iefix') format('embedded-opentype'),
+      url('iconfont.woff2') format('woff2'),
+      url('iconfont.woff') format('woff'),
+      url('iconfont.ttf') format('truetype'),
+      url('iconfont.svg#iconfont') format('svg');
+}
+
+

第二步:定义使用 iconfont 的样式

+
.iconfont {
+  font-family: "iconfont" !important;
+  font-size: 16px;
+  font-style: normal;
+  -webkit-font-smoothing: antialiased;
+  -moz-osx-font-smoothing: grayscale;
+}
+
+

第三步:挑选相应图标并获取字体编码,应用于页面

+
+<span class="iconfont">&#x33;</span>
+
+
+

"iconfont" 是你项目下的 font-family。可以通过编辑项目查看,默认是 "iconfont"。

+
+
+
+
+
    + +
  • + +
    + share +
    +
    .iconshare +
    +
  • + +
  • + +
    + fav +
    +
    .iconfav +
    +
  • + +
  • + +
    + social-linkedin +
    +
    .iconsociallinkedin +
    +
  • + +
  • + +
    + social-apple +
    +
    .iconsocialapple +
    +
  • + +
  • + +
    + social-octocat +
    +
    .iconsocialoctocat +
    +
  • + +
  • + +
    + social-reddit +
    +
    .iconsocialreddit +
    +
  • + +
  • + +
    + social-snapchat +
    +
    .iconsocialsnapchat +
    +
  • + +
  • + +
    + social-skype +
    +
    .iconsocialskype +
    +
  • + +
  • + +
    + social-twitter +
    +
    .iconsocialtwitter +
    +
  • + +
  • + +
    + me +
    +
    .iconme +
    +
  • + +
  • + +
    + tag +
    +
    .icontag +
    +
  • + +
  • + +
    + grid +
    +
    .icongrid +
    +
  • + +
  • + +
    + home +
    +
    .iconhome +
    +
  • + +
+
+

font-class 引用

+
+ +

font-class 是 Unicode 使用方式的一种变种,主要是解决 Unicode 书写不直观,语意不明确的问题。

+

与 Unicode 使用方式相比,具有如下特点:

+
    +
  • 兼容性良好,支持 IE8+,及所有现代浏览器。
  • +
  • 相比于 Unicode 语意明确,书写更直观。可以很容易分辨这个 icon 是什么。
  • +
  • 因为使用 class 来定义图标,所以当要替换图标时,只需要修改 class 里面的 Unicode 引用。
  • +
  • 不过因为本质上还是使用的字体,所以多色图标还是不支持的。
  • +
+

使用步骤如下:

+

第一步:引入项目下面生成的 fontclass 代码:

+
<link rel="stylesheet" href="./iconfont.css">
+
+

第二步:挑选相应图标并获取类名,应用于页面:

+
<span class="iconfont iconxxx"></span>
+
+
+

" + iconfont" 是你项目下的 font-family。可以通过编辑项目查看,默认是 "iconfont"。

+
+
+
+
+
    + +
  • + +
    share
    +
    #iconshare
    +
  • + +
  • + +
    fav
    +
    #iconfav
    +
  • + +
  • + +
    social-linkedin
    +
    #iconsociallinkedin
    +
  • + +
  • + +
    social-apple
    +
    #iconsocialapple
    +
  • + +
  • + +
    social-octocat
    +
    #iconsocialoctocat
    +
  • + +
  • + +
    social-reddit
    +
    #iconsocialreddit
    +
  • + +
  • + +
    social-snapchat
    +
    #iconsocialsnapchat
    +
  • + +
  • + +
    social-skype
    +
    #iconsocialskype
    +
  • + +
  • + +
    social-twitter
    +
    #iconsocialtwitter
    +
  • + +
  • + +
    me
    +
    #iconme
    +
  • + +
  • + +
    tag
    +
    #icontag
    +
  • + +
  • + +
    grid
    +
    #icongrid
    +
  • + +
  • + +
    home
    +
    #iconhome
    +
  • + +
+
+

Symbol 引用

+
+ +

这是一种全新的使用方式,应该说这才是未来的主流,也是平台目前推荐的用法。相关介绍可以参考这篇文章 + 这种用法其实是做了一个 SVG 的集合,与另外两种相比具有如下特点:

+
    +
  • 支持多色图标了,不再受单色限制。
  • +
  • 通过一些技巧,支持像字体那样,通过 font-size, color 来调整样式。
  • +
  • 兼容性较差,支持 IE9+,及现代浏览器。
  • +
  • 浏览器渲染 SVG 的性能一般,还不如 png。
  • +
+

使用步骤如下:

+

第一步:引入项目下面生成的 symbol 代码:

+
<script src="./iconfont.js"></script>
+
+

第二步:加入通用 CSS 代码(引入一次就行):

+
<style>
+.icon {
+  width: 1em;
+  height: 1em;
+  vertical-align: -0.15em;
+  fill: currentColor;
+  overflow: hidden;
+}
+</style>
+
+

第三步:挑选相应图标并获取类名,应用于页面:

+
<svg class="icon" aria-hidden="true">
+  <use xlink:href="#icon-xxx"></use>
+</svg>
+
+
+
+ +
+
+ + + diff --git a/assets/fonts/iconfont.ttf b/assets/fonts/iconfont.ttf new file mode 100644 index 0000000..0c24d31 Binary files /dev/null and b/assets/fonts/iconfont.ttf differ diff --git a/assets/icons/logo-1024.png b/assets/icons/logo-1024.png new file mode 100644 index 0000000..c1e14b3 Binary files /dev/null and b/assets/icons/logo-1024.png differ diff --git a/assets/images/2.0x/account_header.png b/assets/images/2.0x/account_header.png new file mode 100644 index 0000000..b2d2fa3 Binary files /dev/null and b/assets/images/2.0x/account_header.png differ diff --git a/assets/images/2.0x/channel-bbc.png b/assets/images/2.0x/channel-bbc.png new file mode 100644 index 0000000..b8392ed Binary files /dev/null and b/assets/images/2.0x/channel-bbc.png differ diff --git a/assets/images/2.0x/channel-bloomberg.png b/assets/images/2.0x/channel-bloomberg.png new file mode 100644 index 0000000..0b70db1 Binary files /dev/null and b/assets/images/2.0x/channel-bloomberg.png differ diff --git a/assets/images/2.0x/channel-cnn.png b/assets/images/2.0x/channel-cnn.png new file mode 100644 index 0000000..38ffa1e Binary files /dev/null and b/assets/images/2.0x/channel-cnn.png differ diff --git a/assets/images/2.0x/channel-fox.png b/assets/images/2.0x/channel-fox.png new file mode 100644 index 0000000..9f50f4c Binary files /dev/null and b/assets/images/2.0x/channel-fox.png differ diff --git a/assets/images/2.0x/channel-nbc.png b/assets/images/2.0x/channel-nbc.png new file mode 100644 index 0000000..b851b03 Binary files /dev/null and b/assets/images/2.0x/channel-nbc.png differ diff --git a/assets/images/2.0x/channel-rt.png b/assets/images/2.0x/channel-rt.png new file mode 100644 index 0000000..5e5a545 Binary files /dev/null and b/assets/images/2.0x/channel-rt.png differ diff --git a/assets/images/2.0x/feature-1.png b/assets/images/2.0x/feature-1.png new file mode 100644 index 0000000..deff8cc Binary files /dev/null and b/assets/images/2.0x/feature-1.png differ diff --git a/assets/images/2.0x/feature-2.png b/assets/images/2.0x/feature-2.png new file mode 100644 index 0000000..4bf7c68 Binary files /dev/null and b/assets/images/2.0x/feature-2.png differ diff --git a/assets/images/2.0x/feature-3.png b/assets/images/2.0x/feature-3.png new file mode 100644 index 0000000..de73e1c Binary files /dev/null and b/assets/images/2.0x/feature-3.png differ diff --git a/assets/images/2.0x/icons-facebook.png b/assets/images/2.0x/icons-facebook.png new file mode 100644 index 0000000..6611287 Binary files /dev/null and b/assets/images/2.0x/icons-facebook.png differ diff --git a/assets/images/2.0x/icons-google.png b/assets/images/2.0x/icons-google.png new file mode 100644 index 0000000..36ed312 Binary files /dev/null and b/assets/images/2.0x/icons-google.png differ diff --git a/assets/images/2.0x/icons-twitter.png b/assets/images/2.0x/icons-twitter.png new file mode 100644 index 0000000..5b9b9bc Binary files /dev/null and b/assets/images/2.0x/icons-twitter.png differ diff --git a/assets/images/2.0x/logo.png b/assets/images/2.0x/logo.png new file mode 100644 index 0000000..618ada5 Binary files /dev/null and b/assets/images/2.0x/logo.png differ diff --git a/assets/images/3.0x/account_header.png b/assets/images/3.0x/account_header.png new file mode 100644 index 0000000..90f4baf Binary files /dev/null and b/assets/images/3.0x/account_header.png differ diff --git a/assets/images/3.0x/channel-bbc.png b/assets/images/3.0x/channel-bbc.png new file mode 100644 index 0000000..62d092b Binary files /dev/null and b/assets/images/3.0x/channel-bbc.png differ diff --git a/assets/images/3.0x/channel-bloomberg.png b/assets/images/3.0x/channel-bloomberg.png new file mode 100644 index 0000000..dc20af4 Binary files /dev/null and b/assets/images/3.0x/channel-bloomberg.png differ diff --git a/assets/images/3.0x/channel-cnn.png b/assets/images/3.0x/channel-cnn.png new file mode 100644 index 0000000..9c9cd4b Binary files /dev/null and b/assets/images/3.0x/channel-cnn.png differ diff --git a/assets/images/3.0x/channel-fox.png b/assets/images/3.0x/channel-fox.png new file mode 100644 index 0000000..225d989 Binary files /dev/null and b/assets/images/3.0x/channel-fox.png differ diff --git a/assets/images/3.0x/channel-nbc.png b/assets/images/3.0x/channel-nbc.png new file mode 100644 index 0000000..96ddb4a Binary files /dev/null and b/assets/images/3.0x/channel-nbc.png differ diff --git a/assets/images/3.0x/channel-rt.png b/assets/images/3.0x/channel-rt.png new file mode 100644 index 0000000..29b9b2f Binary files /dev/null and b/assets/images/3.0x/channel-rt.png differ diff --git a/assets/images/3.0x/feature-1.png b/assets/images/3.0x/feature-1.png new file mode 100644 index 0000000..f700de3 Binary files /dev/null and b/assets/images/3.0x/feature-1.png differ diff --git a/assets/images/3.0x/feature-2.png b/assets/images/3.0x/feature-2.png new file mode 100644 index 0000000..4d81056 Binary files /dev/null and b/assets/images/3.0x/feature-2.png differ diff --git a/assets/images/3.0x/feature-3.png b/assets/images/3.0x/feature-3.png new file mode 100644 index 0000000..eed5b21 Binary files /dev/null and b/assets/images/3.0x/feature-3.png differ diff --git a/assets/images/3.0x/icons-facebook.png b/assets/images/3.0x/icons-facebook.png new file mode 100644 index 0000000..792ed46 Binary files /dev/null and b/assets/images/3.0x/icons-facebook.png differ diff --git a/assets/images/3.0x/icons-google.png b/assets/images/3.0x/icons-google.png new file mode 100644 index 0000000..a4cd65f Binary files /dev/null and b/assets/images/3.0x/icons-google.png differ diff --git a/assets/images/3.0x/icons-twitter.png b/assets/images/3.0x/icons-twitter.png new file mode 100644 index 0000000..0186d02 Binary files /dev/null and b/assets/images/3.0x/icons-twitter.png differ diff --git a/assets/images/3.0x/logo.png b/assets/images/3.0x/logo.png new file mode 100644 index 0000000..1805f53 Binary files /dev/null and b/assets/images/3.0x/logo.png differ diff --git a/assets/images/account_header.png b/assets/images/account_header.png new file mode 100644 index 0000000..c7b3d0e Binary files /dev/null and b/assets/images/account_header.png differ diff --git a/assets/images/channel-bbc.png b/assets/images/channel-bbc.png new file mode 100644 index 0000000..fc7f226 Binary files /dev/null and b/assets/images/channel-bbc.png differ diff --git a/assets/images/channel-bloomberg.png b/assets/images/channel-bloomberg.png new file mode 100644 index 0000000..277c5d7 Binary files /dev/null and b/assets/images/channel-bloomberg.png differ diff --git a/assets/images/channel-cnn.png b/assets/images/channel-cnn.png new file mode 100644 index 0000000..f71f215 Binary files /dev/null and b/assets/images/channel-cnn.png differ diff --git a/assets/images/channel-fox.png b/assets/images/channel-fox.png new file mode 100644 index 0000000..2b74fac Binary files /dev/null and b/assets/images/channel-fox.png differ diff --git a/assets/images/channel-nbc.png b/assets/images/channel-nbc.png new file mode 100644 index 0000000..4014e8b Binary files /dev/null and b/assets/images/channel-nbc.png differ diff --git a/assets/images/channel-rt.png b/assets/images/channel-rt.png new file mode 100644 index 0000000..5966a45 Binary files /dev/null and b/assets/images/channel-rt.png differ diff --git a/assets/images/feature-1.png b/assets/images/feature-1.png new file mode 100644 index 0000000..6258f9c Binary files /dev/null and b/assets/images/feature-1.png differ diff --git a/assets/images/feature-2.png b/assets/images/feature-2.png new file mode 100644 index 0000000..01e69cf Binary files /dev/null and b/assets/images/feature-2.png differ diff --git a/assets/images/feature-3.png b/assets/images/feature-3.png new file mode 100644 index 0000000..4c7ce6c Binary files /dev/null and b/assets/images/feature-3.png differ diff --git a/assets/images/icons-facebook.png b/assets/images/icons-facebook.png new file mode 100644 index 0000000..3d986e0 Binary files /dev/null and b/assets/images/icons-facebook.png differ diff --git a/assets/images/icons-google.png b/assets/images/icons-google.png new file mode 100644 index 0000000..c40d6b3 Binary files /dev/null and b/assets/images/icons-google.png differ diff --git a/assets/images/icons-twitter.png b/assets/images/icons-twitter.png new file mode 100644 index 0000000..62eddde Binary files /dev/null and b/assets/images/icons-twitter.png differ diff --git a/assets/images/logo.png b/assets/images/logo.png new file mode 100644 index 0000000..e6a5795 Binary files /dev/null and b/assets/images/logo.png differ diff --git a/ios/.gitignore b/ios/.gitignore new file mode 100644 index 0000000..7a7f987 --- /dev/null +++ b/ios/.gitignore @@ -0,0 +1,34 @@ +**/dgph +*.mode1v3 +*.mode2v3 +*.moved-aside +*.pbxuser +*.perspectivev3 +**/*sync/ +.sconsign.dblite +.tags* +**/.vagrant/ +**/DerivedData/ +Icon? +**/Pods/ +**/.symlinks/ +profile +xcuserdata +**/.generated/ +Flutter/App.framework +Flutter/Flutter.framework +Flutter/Flutter.podspec +Flutter/Generated.xcconfig +Flutter/ephemeral/ +Flutter/app.flx +Flutter/app.zip +Flutter/flutter_assets/ +Flutter/flutter_export_environment.sh +ServiceDefinitions.json +Runner/GeneratedPluginRegistrant.* + +# Exceptions to above rules. +!default.mode1v3 +!default.mode2v3 +!default.pbxuser +!default.perspectivev3 diff --git a/ios/Flutter/AppFrameworkInfo.plist b/ios/Flutter/AppFrameworkInfo.plist new file mode 100644 index 0000000..9625e10 --- /dev/null +++ b/ios/Flutter/AppFrameworkInfo.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + App + CFBundleIdentifier + io.flutter.flutter.app + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + App + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1.0 + MinimumOSVersion + 11.0 + + diff --git a/ios/Flutter/Debug.xcconfig b/ios/Flutter/Debug.xcconfig new file mode 100644 index 0000000..592ceee --- /dev/null +++ b/ios/Flutter/Debug.xcconfig @@ -0,0 +1 @@ +#include "Generated.xcconfig" diff --git a/ios/Flutter/Release.xcconfig b/ios/Flutter/Release.xcconfig new file mode 100644 index 0000000..592ceee --- /dev/null +++ b/ios/Flutter/Release.xcconfig @@ -0,0 +1 @@ +#include "Generated.xcconfig" diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj new file mode 100644 index 0000000..2d61504 --- /dev/null +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -0,0 +1,613 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 54; + objects = { + +/* Begin PBXBuildFile section */ + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; + 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 331C8085294A63A400263BE5 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 97C146E61CF9000F007C117D /* Project object */; + proxyType = 1; + remoteGlobalIDString = 97C146ED1CF9000F007C117D; + remoteInfo = Runner; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 9705A1C41CF9048500538489 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; + 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; + 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; + 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; }; + 331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 97C146EB1CF9000F007C117D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 9740EEB11CF90186004384FC /* Flutter */ = { + isa = PBXGroup; + children = ( + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, + 9740EEB21CF90195004384FC /* Debug.xcconfig */, + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, + 9740EEB31CF90195004384FC /* Generated.xcconfig */, + ); + name = Flutter; + sourceTree = ""; + }; + 331C8082294A63A400263BE5 /* RunnerTests */ = { + isa = PBXGroup; + children = ( + 331C807B294A618700263BE5 /* RunnerTests.swift */, + ); + path = RunnerTests; + sourceTree = ""; + }; + 97C146E51CF9000F007C117D = { + isa = PBXGroup; + children = ( + 9740EEB11CF90186004384FC /* Flutter */, + 97C146F01CF9000F007C117D /* Runner */, + 97C146EF1CF9000F007C117D /* Products */, + 331C8082294A63A400263BE5 /* RunnerTests */, + ); + sourceTree = ""; + }; + 97C146EF1CF9000F007C117D /* Products */ = { + isa = PBXGroup; + children = ( + 97C146EE1CF9000F007C117D /* Runner.app */, + 331C8081294A63A400263BE5 /* RunnerTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 97C146F01CF9000F007C117D /* Runner */ = { + isa = PBXGroup; + children = ( + 97C146FA1CF9000F007C117D /* Main.storyboard */, + 97C146FD1CF9000F007C117D /* Assets.xcassets */, + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, + 97C147021CF9000F007C117D /* Info.plist */, + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, + ); + path = Runner; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 331C8080294A63A400263BE5 /* RunnerTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */; + buildPhases = ( + 331C807D294A63A400263BE5 /* Sources */, + 331C807E294A63A400263BE5 /* Frameworks */, + 331C807F294A63A400263BE5 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 331C8086294A63A400263BE5 /* PBXTargetDependency */, + ); + name = RunnerTests; + productName = RunnerTests; + productReference = 331C8081294A63A400263BE5 /* RunnerTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 97C146ED1CF9000F007C117D /* Runner */ = { + isa = PBXNativeTarget; + buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; + buildPhases = ( + 9740EEB61CF901F6004384FC /* Run Script */, + 97C146EA1CF9000F007C117D /* Sources */, + 97C146EB1CF9000F007C117D /* Frameworks */, + 97C146EC1CF9000F007C117D /* Resources */, + 9705A1C41CF9048500538489 /* Embed Frameworks */, + 3B06AD1E1E4923F5004D2608 /* Thin Binary */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Runner; + productName = Runner; + productReference = 97C146EE1CF9000F007C117D /* Runner.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 97C146E61CF9000F007C117D /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 1300; + ORGANIZATIONNAME = ""; + TargetAttributes = { + 331C8080294A63A400263BE5 = { + CreatedOnToolsVersion = 14.0; + TestTargetID = 97C146ED1CF9000F007C117D; + }; + 97C146ED1CF9000F007C117D = { + CreatedOnToolsVersion = 7.3.1; + LastSwiftMigration = 1100; + }; + }; + }; + buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 97C146E51CF9000F007C117D; + productRefGroup = 97C146EF1CF9000F007C117D /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 97C146ED1CF9000F007C117D /* Runner */, + 331C8080294A63A400263BE5 /* RunnerTests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 331C807F294A63A400263BE5 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 97C146EC1CF9000F007C117D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}", + ); + name = "Thin Binary"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; + }; + 9740EEB61CF901F6004384FC /* Run Script */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Run Script"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 331C807D294A63A400263BE5 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 97C146EA1CF9000F007C117D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 331C8086294A63A400263BE5 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 97C146ED1CF9000F007C117D /* Runner */; + targetProxy = 331C8085294A63A400263BE5 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 97C146FA1CF9000F007C117D /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C146FB1CF9000F007C117D /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C147001CF9000F007C117D /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 249021D3217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Profile; + }; + 249021D4217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.example.newsGetx; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Profile; + }; + 331C8088294A63A400263BE5 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = AE0B7B92F70575B8D7E0D07E /* Pods-RunnerTests.debug.xcconfig */; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.example.newsGetx.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Debug; + }; + 331C8089294A63A400263BE5 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 89B67EB44CE7B6631473024E /* Pods-RunnerTests.release.xcconfig */; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.example.newsGetx.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Release; + }; + 331C808A294A63A400263BE5 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 640959BDD8F10B91D80A66BE /* Pods-RunnerTests.profile.xcconfig */; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.example.newsGetx.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Profile; + }; + 97C147031CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 97C147041CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 97C147061CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.example.newsGetx; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Debug; + }; + 97C147071CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.example.newsGetx; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 331C8088294A63A400263BE5 /* Debug */, + 331C8089294A63A400263BE5 /* Release */, + 331C808A294A63A400263BE5 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147031CF9000F007C117D /* Debug */, + 97C147041CF9000F007C117D /* Release */, + 249021D3217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147061CF9000F007C117D /* Debug */, + 97C147071CF9000F007C117D /* Release */, + 249021D4217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 97C146E61CF9000F007C117D /* Project object */; +} diff --git a/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 0000000..f9b0d7c --- /dev/null +++ b/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme new file mode 100644 index 0000000..e42adcb --- /dev/null +++ b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -0,0 +1,98 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ios/Runner.xcworkspace/contents.xcworkspacedata b/ios/Runner.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..1d526a1 --- /dev/null +++ b/ios/Runner.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 0000000..f9b0d7c --- /dev/null +++ b/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/ios/Runner/AppDelegate.swift b/ios/Runner/AppDelegate.swift new file mode 100644 index 0000000..70693e4 --- /dev/null +++ b/ios/Runner/AppDelegate.swift @@ -0,0 +1,13 @@ +import UIKit +import Flutter + +@UIApplicationMain +@objc class AppDelegate: FlutterAppDelegate { + override func application( + _ application: UIApplication, + didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? + ) -> Bool { + GeneratedPluginRegistrant.register(with: self) + return super.application(application, didFinishLaunchingWithOptions: launchOptions) + } +} diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..d36b1fa --- /dev/null +++ b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,122 @@ +{ + "images" : [ + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "Icon-App-20x20@2x.png", + "scale" : "2x" + }, + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "Icon-App-20x20@3x.png", + "scale" : "3x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@1x.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@3x.png", + "scale" : "3x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-App-40x40@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-App-40x40@3x.png", + "scale" : "3x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-App-60x60@2x.png", + "scale" : "2x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-App-60x60@3x.png", + "scale" : "3x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "Icon-App-20x20@1x.png", + "scale" : "1x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "Icon-App-20x20@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-App-29x29@1x.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-App-29x29@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-App-40x40@1x.png", + "scale" : "1x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-App-40x40@2x.png", + "scale" : "2x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-App-76x76@1x.png", + "scale" : "1x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-App-76x76@2x.png", + "scale" : "2x" + }, + { + "size" : "83.5x83.5", + "idiom" : "ipad", + "filename" : "Icon-App-83.5x83.5@2x.png", + "scale" : "2x" + }, + { + "size" : "1024x1024", + "idiom" : "ios-marketing", + "filename" : "Icon-App-1024x1024@1x.png", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png new file mode 100644 index 0000000..dc9ada4 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png new file mode 100644 index 0000000..7353c41 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png new file mode 100644 index 0000000..797d452 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png new file mode 100644 index 0000000..6ed2d93 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png new file mode 100644 index 0000000..4cd7b00 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png new file mode 100644 index 0000000..fe73094 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png new file mode 100644 index 0000000..321773c Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png new file mode 100644 index 0000000..797d452 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png new file mode 100644 index 0000000..502f463 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png new file mode 100644 index 0000000..0ec3034 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png new file mode 100644 index 0000000..0ec3034 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png new file mode 100644 index 0000000..e9f5fea Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png new file mode 100644 index 0000000..84ac32a Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png new file mode 100644 index 0000000..8953cba Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png new file mode 100644 index 0000000..0467bf1 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json new file mode 100644 index 0000000..0bedcf2 --- /dev/null +++ b/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "LaunchImage.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "LaunchImage@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "LaunchImage@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png new file mode 100644 index 0000000..9da19ea Binary files /dev/null and b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png differ diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png new file mode 100644 index 0000000..9da19ea Binary files /dev/null and b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png differ diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png new file mode 100644 index 0000000..9da19ea Binary files /dev/null and b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png differ diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md new file mode 100644 index 0000000..89c2725 --- /dev/null +++ b/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md @@ -0,0 +1,5 @@ +# Launch Screen Assets + +You can customize the launch screen with your own desired assets by replacing the image files in this directory. + +You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. \ No newline at end of file diff --git a/ios/Runner/Base.lproj/LaunchScreen.storyboard b/ios/Runner/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..f2e259c --- /dev/null +++ b/ios/Runner/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ios/Runner/Base.lproj/Main.storyboard b/ios/Runner/Base.lproj/Main.storyboard new file mode 100644 index 0000000..f3c2851 --- /dev/null +++ b/ios/Runner/Base.lproj/Main.storyboard @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist new file mode 100644 index 0000000..d0bd009 --- /dev/null +++ b/ios/Runner/Info.plist @@ -0,0 +1,51 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleDisplayName + News Getx + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + news_getx + CFBundlePackageType + APPL + CFBundleShortVersionString + $(FLUTTER_BUILD_NAME) + CFBundleSignature + ???? + CFBundleVersion + $(FLUTTER_BUILD_NUMBER) + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UIViewControllerBasedStatusBarAppearance + + CADisableMinimumFrameDurationOnPhone + + UIApplicationSupportsIndirectInputEvents + + + diff --git a/ios/Runner/Runner-Bridging-Header.h b/ios/Runner/Runner-Bridging-Header.h new file mode 100644 index 0000000..308a2a5 --- /dev/null +++ b/ios/Runner/Runner-Bridging-Header.h @@ -0,0 +1 @@ +#import "GeneratedPluginRegistrant.h" diff --git a/ios/RunnerTests/RunnerTests.swift b/ios/RunnerTests/RunnerTests.swift new file mode 100644 index 0000000..86a7c3b --- /dev/null +++ b/ios/RunnerTests/RunnerTests.swift @@ -0,0 +1,12 @@ +import Flutter +import UIKit +import XCTest + +class RunnerTests: XCTestCase { + + func testExample() { + // If you add code to the Runner application, consider adding tests here. + // See https://developer.apple.com/documentation/xctest for more information about using XCTest. + } + +} diff --git a/lib/data/model/sign_in.dart b/lib/data/model/sign_in.dart new file mode 100644 index 0000000..f2ff4b8 --- /dev/null +++ b/lib/data/model/sign_in.dart @@ -0,0 +1,6 @@ +class UserLoginRequest { + String email; + String password; + + UserLoginRequest({required this.email, required this.password}); +} diff --git a/lib/main.dart b/lib/main.dart new file mode 100644 index 0000000..614b428 --- /dev/null +++ b/lib/main.dart @@ -0,0 +1,45 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_easyloading/flutter_easyloading.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:get/get.dart'; +import 'package:news_getx/routes/app_pages.dart'; +import 'package:news_getx/theme/app_theme.dart'; +import 'package:pull_to_refresh/pull_to_refresh.dart'; + + +void main() { + runApp(const MyApp()); +} + +class MyApp extends StatelessWidget { + const MyApp({super.key}); + + // This widget is the root of your application. + @override + Widget build(BuildContext context) { + return ScreenUtilInit( + designSize: Size(375, 812), + builder: (BuildContext context, Widget? child) { + return RefreshConfiguration( + headerBuilder: () => ClassicHeader(), + footerBuilder: () => ClassicFooter(), + hideFooterWhenNotFull: true, + headerTriggerDistance: 80, + maxOverScrollExtent: 100, + footerTriggerDistance: 150, + + child: GetMaterialApp( + title: 'News', + debugShowCheckedModeBanner: false, + theme: AppTheme.light, + + initialRoute: AppRoutes.Initial, + getPages: AppPages.pages, + + builder: EasyLoading.init(), + ), + ); + }, + ); + } +} diff --git a/lib/modules/not_found/not_found_binding.dart b/lib/modules/not_found/not_found_binding.dart new file mode 100644 index 0000000..7cdd8f0 --- /dev/null +++ b/lib/modules/not_found/not_found_binding.dart @@ -0,0 +1,10 @@ +import 'package:get/get.dart'; + +import 'not_found_controller.dart'; + +class NotFoundBinding extends Bindings { + @override + void dependencies() { + Get.lazyPut(() => NotFoundController()); + } +} diff --git a/lib/modules/not_found/not_found_controller.dart b/lib/modules/not_found/not_found_controller.dart new file mode 100644 index 0000000..7c3953f --- /dev/null +++ b/lib/modules/not_found/not_found_controller.dart @@ -0,0 +1,5 @@ +import 'package:get/get.dart'; + +class NotFoundController extends GetxController { + +} diff --git a/lib/modules/not_found/not_found_page.dart b/lib/modules/not_found/not_found_page.dart new file mode 100644 index 0000000..16c543a --- /dev/null +++ b/lib/modules/not_found/not_found_page.dart @@ -0,0 +1,13 @@ +import 'package:flutter/material.dart'; +import 'package:get/get.dart'; + +import 'not_found_controller.dart'; + +class NotFoundPage extends GetView { + const NotFoundPage({Key? key}) : super(key: key); + + @override + Widget build(BuildContext context) { + return Container(); + } +} diff --git a/lib/modules/sign_in/sign_in_binding.dart b/lib/modules/sign_in/sign_in_binding.dart new file mode 100644 index 0000000..54aeab2 --- /dev/null +++ b/lib/modules/sign_in/sign_in_binding.dart @@ -0,0 +1,10 @@ +import 'package:get/get.dart'; + +import 'sign_in_controller.dart'; + +class SignInBinding extends Bindings { + @override + void dependencies() { + Get.lazyPut(() => SignInController()); + } +} diff --git a/lib/modules/sign_in/sign_in_controller.dart b/lib/modules/sign_in/sign_in_controller.dart new file mode 100644 index 0000000..2d7e602 --- /dev/null +++ b/lib/modules/sign_in/sign_in_controller.dart @@ -0,0 +1,45 @@ +import 'package:flutter/cupertino.dart'; +import 'package:get/get.dart'; +import 'package:news_getx/modules/widgets/toast.dart'; +import 'package:news_getx/routes/app_pages.dart'; +import 'package:news_getx/utils/validator.dart'; + +class SignInController extends GetxController { + // email的控制器 + final TextEditingController emailController = TextEditingController(); + // 密码的控制器 + final TextEditingController passwordController = TextEditingController(); + + // 跳转 注册界面 + handleNavSignUp(){ + // TODO 注册页面 + Get.toNamed(AppRoutes.Signup); + } + + // 忘记密码 + handleForgotPassword() { + toastInfo(msg: "忘记密码"); + } + + // 执行登录操作 + handleSignIn() async { + if (!isEmail(emailController.text)) { + toastInfo(msg: "请输入正确的邮箱"); + return; + } + + if(!checkStringLength(passwordController.text, 6)){ + toastInfo(msg: '密码不能小于6位'); + return; + } + + Get.offAndToNamed(AppRoutes.Application); + } + + @override + void dispose() { + emailController.dispose(); + passwordController.dispose(); + super.dispose(); + } +} diff --git a/lib/modules/sign_in/sign_in_page.dart b/lib/modules/sign_in/sign_in_page.dart new file mode 100644 index 0000000..1cee5ee --- /dev/null +++ b/lib/modules/sign_in/sign_in_page.dart @@ -0,0 +1,212 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:get/get.dart'; +import 'package:news_getx/modules/widgets/button.dart'; +import 'package:news_getx/modules/widgets/input.dart'; +import 'package:news_getx/theme/app_colors.dart'; +import 'package:news_getx/theme/app_shadows.dart'; + +import 'sign_in_controller.dart'; + +class SignInPage extends GetView { + const SignInPage({Key? key}) : super(key: key); + + // logo + Widget _buildLogo() { + return Container( + width: 110.w, + margin: EdgeInsets.only(top: (40 + 44.0).h), + child: Column( + children: [ + Container( + width: 76.w, + height: 76.w, + decoration: BoxDecoration( + color: AppColors.primaryBackground, + boxShadow: [ + AppShadows.primaryShadow, + ], + // 父容器的50% + borderRadius: BorderRadius.circular((76 * 0.5).w), + ), + child: Image.asset( + 'assets/images/logo.png', + fit: BoxFit.none, + ), + ), + Container( + margin: EdgeInsets.only(top: 15.h), + child: Text( + 'SECTOR', + style: TextStyle( + color: AppColors.primaryText, + fontFamily: "Montserrat", + fontWeight: FontWeight.w600, + fontSize: 24.sp, + height: 1, + ), + textAlign: TextAlign.center, + ), + ), + Text( + 'news', + style: TextStyle( + color: AppColors.primaryText, + fontFamily: "Avenir", + fontWeight: FontWeight.w400, + fontSize: 16.sp, + height: 1, + ), + ), + ], + ), + ); + } + + // 登录表单 + Widget _buildInputForm() { + return Container( + width: 295.w, + margin: EdgeInsets.only(top: 49.h), + child: Column( + children: [ + // email input + InputTextEdit( + controller: controller.emailController, + keyboardType: TextInputType.emailAddress, + hintText: "Email", + marginTop: 0, + ), + // password input + InputTextEdit( + controller: controller.passwordController, + keyboardType: TextInputType.visiblePassword, + hintText: "Password", + isPassword: true, + ), + // 注册、登录 横向布局 + Container( + height: 44.h, + margin: EdgeInsets.only(top: 15.h), + child: Row( + children: [ + // 注册 + FlatButton( + onPressed: controller.handleNavSignUp, + title: "Sign up", + gbColor: AppColors.thirdElement, + ), + Spacer(), + // 登录 + FlatButton( + onPressed: controller.handleSignIn, + gbColor: AppColors.primaryElement, + title: "Sign in", + ) + ], + ), + ), + + // Fogot password + Padding( + padding: const EdgeInsets.only(top: 8.0), + child: TextButton( + onPressed: () {}, + child: Text( + "Fogot password?", + textAlign: TextAlign.center, + style: TextStyle( + color: AppColors.secondaryElementText, + fontFamily: "Avenir", + fontWeight: FontWeight.w400, + fontSize: 16.sp, + height: 1, // 设置下行高,否则字体下沉 + ), + ), + ), + ) + ], + ), + ); + } + + // 第三方登录 + Widget _buildThirdPartyLogin() { + return Container( + width: 295.w, + margin: EdgeInsets.only(top: 40.h), + child: Column( + children: [ + Text( + 'Or sign in with social networks', + textAlign: TextAlign.center, + style: TextStyle( + color: AppColors.primaryText, + fontFamily: "Avenir", + fontWeight: FontWeight.w400, + fontSize: 16.sp, + ), + ), + Padding( + padding: EdgeInsets.only(top: 20.h), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + IconBorderFlatButton( + onPressed: () {}, + iconFileName: "twitter", + width: 80.w, + ), + IconBorderFlatButton( + onPressed: () {}, + iconFileName: "google", + width: 80.w, + ), + IconBorderFlatButton( + onPressed: () {}, + iconFileName: "facebook", + width: 80.w, + ) + ], + ), + ) + ], + ), + ); + } + + // 注册按钮 + Widget _buildSignupButton() { + return Container( + margin: EdgeInsets.symmetric(vertical: 20.h), + child: FlatButton( + width: 295, + height: 44, + title: "Sign up", + onPressed: controller.handleNavSignUp, + gbColor: AppColors.secondaryElement, + fontColor: AppColors.primaryText, + fontWeight: FontWeight.w500, + fontSize: 16.sp, + ), + ); + } + + @override + Widget build(BuildContext context) { + return Scaffold( + resizeToAvoidBottomInset: false, + body: Center( + child: Column( + children: [ + _buildLogo(), + _buildInputForm(), + Spacer(), + _buildThirdPartyLogin(), + _buildSignupButton(), + ], + ), + ), + ); + } +} diff --git a/lib/modules/sign_up/sign_up_binding.dart b/lib/modules/sign_up/sign_up_binding.dart new file mode 100644 index 0000000..61bf20d --- /dev/null +++ b/lib/modules/sign_up/sign_up_binding.dart @@ -0,0 +1,10 @@ +import 'package:get/get.dart'; + +import 'sign_up_controller.dart'; + +class SignUpBinding extends Bindings { + @override + void dependencies() { + Get.lazyPut(() => SignUpController()); + } +} diff --git a/lib/modules/sign_up/sign_up_controller.dart b/lib/modules/sign_up/sign_up_controller.dart new file mode 100644 index 0000000..c621688 --- /dev/null +++ b/lib/modules/sign_up/sign_up_controller.dart @@ -0,0 +1,60 @@ +import 'package:flutter/material.dart'; +import 'package:get/get.dart'; +import 'package:news_getx/modules/widgets/toast.dart'; +import 'package:news_getx/routes/app_pages.dart'; +import 'package:news_getx/utils/validator.dart'; + +class SignUpController extends GetxController { + // email的控制器 + final TextEditingController fullNameController = TextEditingController(); + // email的控制器 + final TextEditingController emailController = TextEditingController(); + // 密码的控制器 + final TextEditingController passwordController = TextEditingController(); + + // 返回上一级 + handleNavPop() { + Get.back(); + } + + handleRegister() { + if (!checkStringLength(fullNameController.text, 5)) { + toastInfo(msg: '用户名不能小于5位'); + return; + } + if (!isEmail(emailController.text)) { + toastInfo(msg: '请正确输入邮件'); + return; + } + if (!checkStringLength(passwordController.text, 6)) { + toastInfo(msg: '密码不能小于6位'); + return; + } + + toastInfo(msg: '注册成功'); + Get.back(); + } + + // 提示信息 + handleTip() { + toastInfo(msg: '这是注册界面'); + } + + // 忘记密码 + handleFogotPassword() { + toastInfo(msg: '忘记密码'); + } + + + handleSignIn() { + Get.toNamed(AppRoutes.Signin); + } + + @override + void dispose() { + fullNameController.dispose(); + emailController.dispose(); + passwordController.dispose(); + super.dispose(); + } +} diff --git a/lib/modules/sign_up/sign_up_page.dart b/lib/modules/sign_up/sign_up_page.dart new file mode 100644 index 0000000..c561935 --- /dev/null +++ b/lib/modules/sign_up/sign_up_page.dart @@ -0,0 +1,220 @@ +import 'package:flutter/gestures.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:get/get.dart'; +import 'package:news_getx/modules/widgets/app_bar.dart'; +import 'package:news_getx/modules/widgets/button.dart'; +import 'package:news_getx/modules/widgets/input.dart'; +import 'package:news_getx/theme/app_colors.dart'; + +import 'sign_up_controller.dart'; + +class SignUpPage extends GetView { + const SignUpPage({Key? key}) : super(key: key); + + // logo + Widget _buildLogo() { + return Container( + margin: EdgeInsets.only(top: 50.h), + child: Text( + "Sign up", + textAlign: TextAlign.center, + style: TextStyle( + color: AppColors.primaryText, + fontFamily: "Montserrat", + fontWeight: FontWeight.w600, + fontSize: 24.sp, + height: 1, + ), + ), + ); + } + + // 登录表单 + Widget _buildInputForm() { + return Container( + width: 295.w, + margin: EdgeInsets.only(top: 49.h), + child: Column( + children: [ + // email input + InputTextEdit( + controller: controller.fullNameController, + keyboardType: TextInputType.text, + hintText: "Full name", + marginTop: 0, + ), + // email input + InputTextEdit( + controller: controller.emailController, + keyboardType: TextInputType.emailAddress, + hintText: "Email", + ), + // password input + InputTextEdit( + controller: controller.passwordController, + keyboardType: TextInputType.visiblePassword, + hintText: "Password", + isPassword: true, + ), + // 注册、登录 横向布局 + Container( + height: 44.h, + margin: EdgeInsets.only(top: 15.h), + child: Row( + children: [ + // 注册 + FlatButton( + onPressed: controller.handleRegister, + width: 295, + title: "Create an account", + ), + ], + ), + ), + + // Fogot password + Padding( + padding: const EdgeInsets.fromLTRB(20, 8, 20, 0), + child: Text.rich( + TextSpan(children: [ + TextSpan(text: 'By signing up you agree to our '), + TextSpan( + text: 'Terms ', + style: TextStyle( + color: AppColors.secondaryElementText, + ), + recognizer: TapGestureRecognizer() + ..onTap = () { + // 处理点击事件 + print('Terms'); + }, + ), + TextSpan(text: 'and '), + TextSpan( + text: 'Conditions of Use', + style: TextStyle( + color: AppColors.secondaryElementText, + ), + recognizer: TapGestureRecognizer() + ..onTap = () { + // 处理点击事件 + print('Conditions'); + }, + ), + ]), + textAlign: TextAlign.center, + style: TextStyle( + fontFamily: "Avenir", + fontWeight: FontWeight.w400, + fontSize: 16.sp, + ), + ), + ) + ], + ), + ); + } + + // 第三方登录 + Widget _buildThirdPartyLogin() { + return Container( + width: 295.w, + margin: EdgeInsets.only(top: 40.h), + child: Column( + children: [ + Text( + 'Or sign in with social networks', + textAlign: TextAlign.center, + style: TextStyle( + color: AppColors.primaryText, + fontFamily: "Avenir", + fontWeight: FontWeight.w400, + fontSize: 16.sp, + ), + ), + Padding( + padding: EdgeInsets.only(top: 20.h), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + IconBorderFlatButton( + onPressed: () {}, + iconFileName: "twitter", + width: 80.w, + ), + IconBorderFlatButton( + onPressed: () {}, + iconFileName: "google", + width: 80.w, + ), + IconBorderFlatButton( + onPressed: () {}, + iconFileName: "facebook", + width: 80.w, + ) + ], + ), + ) + ], + ), + ); + } + + // 注册按钮 + Widget _buildHaveAccountButton() { + return Container( + margin: EdgeInsets.symmetric(vertical: 20.h), + child: FlatButton( + width: 295, + height: 44, + title: "I have an account", + onPressed: controller.handleNavPop, + gbColor: AppColors.secondaryElement, + fontColor: AppColors.primaryText, + fontWeight: FontWeight.w500, + fontSize: 16.sp, + ), + ); + } + + @override + Widget build(BuildContext context) { + return Scaffold( + // resizeToAvoidBottomInset: false, + appBar: transparentAppBar( + leading: IconButton( + icon: Icon( + Icons.arrow_back, + color: AppColors.primaryText, + ), + onPressed: controller.handleNavPop, + ), + actions: [ + IconButton( + icon: Icon( + Icons.info_outline, + color: AppColors.primaryText, + ), + onPressed: controller.handleTip, + ) + ], + ), + body: Center( + child: Column( + children: [ + Divider(height: 1), + _buildLogo(), + _buildInputForm(), + // Spacer(), + SizedBox(height: 200.h,), + SizedBox(height: 80.h,), + // _buildThirdPartyLogin(), + // _buildHaveAccountButton(), + ElevatedButton(onPressed: (){}, child: Text('测试')) + ], + ), + ), + ); + } +} diff --git a/lib/modules/welcome/welcome_binding.dart b/lib/modules/welcome/welcome_binding.dart new file mode 100644 index 0000000..eea2ff7 --- /dev/null +++ b/lib/modules/welcome/welcome_binding.dart @@ -0,0 +1,10 @@ +import 'package:get/get.dart'; + +import 'welcome_controller.dart'; + +class WelcomeBinding extends Bindings { + @override + void dependencies() { + Get.lazyPut(() => WelcomeController()); + } +} diff --git a/lib/modules/welcome/welcome_controller.dart b/lib/modules/welcome/welcome_controller.dart new file mode 100644 index 0000000..862e11b --- /dev/null +++ b/lib/modules/welcome/welcome_controller.dart @@ -0,0 +1,8 @@ +import 'package:get/get.dart'; +import 'package:news_getx/routes/app_pages.dart'; + +class WelcomeController extends GetxController { + handleNavSignIn(){ + Get.offAndToNamed(AppRoutes.Signin); + } +} diff --git a/lib/modules/welcome/welcome_page.dart b/lib/modules/welcome/welcome_page.dart new file mode 100644 index 0000000..769292f --- /dev/null +++ b/lib/modules/welcome/welcome_page.dart @@ -0,0 +1,155 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:get/get.dart'; +import 'package:news_getx/theme/app_colors.dart'; +import 'package:news_getx/theme/app_radii.dart'; + +import 'welcome_controller.dart'; + +class WelcomePage extends GetView { + const WelcomePage({Key? key}) : super(key: key); + + Widget _buildPageHeadTitle() { + return Container( + margin: EdgeInsets.only(top: (60 + 44).h), + child: Text( + "Features", + textAlign: TextAlign.center, + style: TextStyle( + fontSize: 24.sp, + color: AppColors.primaryText, + fontFamily: "Montserrat", + fontWeight: FontWeight.w600, + height: 1, + ), + ), + ); + } + + Widget _buildPageHeaderDetail() { + return Container( + width: 242.w, + height: 70.h, + margin: EdgeInsets.only(top: 14.h), + child: Text( + "The best of news channels all in one place. " + "Trusted sources and personalized news for you.", + textAlign: TextAlign.center, + style: TextStyle( + color: AppColors.primaryText, + fontFamily: "Avenir", + fontSize: 16.sp, + height: 1.3, + fontWeight: FontWeight.normal, + ), + ), + ); + } + + // 设定好了宽度 + // 宽度 80 + 20 + 195 = 295 + Widget _buildFeatureItem(String imageName, String intro, double marginTop) { + return Container( + width: 295.w, + height: 80.h, + margin: EdgeInsets.only(top: marginTop.h), + child: Row( + children: [ + SizedBox( + width: 80.w, + height: 80.h, + child: Image.asset( + "assets/images/$imageName.png", + fit: BoxFit.none, + ), + ), + Spacer(), + SizedBox( + width: 195.w, + child: Text( + intro, + textAlign: TextAlign.left, + style: TextStyle( + color: AppColors.primaryText, + fontFamily: "Avenir", + fontWeight: FontWeight.normal, + fontSize: 16.sp, + ), + ), + ) + ], + ), + ); + } + + Widget _buildStartButton() { + return Container( + width: 295.w, + height: 44.h, + margin: EdgeInsets.only(bottom: 20.h), + child: TextButton( + style: ButtonStyle( + // 设置字体大小 + textStyle: MaterialStateProperty.all(TextStyle(fontSize: 16.sp)), + shape: MaterialStateProperty.all( + RoundedRectangleBorder(borderRadius: Radii.k6pxRadius), + ), + backgroundColor: MaterialStateProperty.resolveWith((states) { + // 按压背景色 + if (states.contains(MaterialState.pressed)){ + return Colors.blue[200]; + } + return AppColors.primaryElement; + }), + // 用于前景色调整 字体 + foregroundColor: MaterialStateProperty.resolveWith((states) { + // 焦点但是没按的背景色 + if (states.contains(MaterialState.focused) && !states.contains(MaterialState.pressed)) { + return Colors.blue; + }else if (states.contains(MaterialState.pressed)) { + return Colors.deepPurple; + } + return AppColors.primaryElementText; + }) + ), + onPressed: controller.handleNavSignIn, + child: Text("Get started"), + ), + ); + } + + @override + Widget build(BuildContext context) { + return Scaffold( + body: Center( + child: Column( + children: [ + // 标题 + _buildPageHeadTitle(), + // 标题信息 + _buildPageHeaderDetail(), + // 每一项内容 + _buildFeatureItem( + "feature-1", + "Compelling photography and typography provide a beautiful reading", + 86, + ), + _buildFeatureItem( + "feature-2", + "Sector news never shares your personal data with advertisers or publishers", + 40, + ), + _buildFeatureItem( + "feature-3", + "You can get Premium to unlock hundreds of publications", + 40, + ), + Spacer(), + // 按钮 + _buildStartButton() + ], + ), + ), + ); + } +} diff --git a/lib/modules/widgets/app_bar.dart b/lib/modules/widgets/app_bar.dart new file mode 100644 index 0000000..2c300ce --- /dev/null +++ b/lib/modules/widgets/app_bar.dart @@ -0,0 +1,31 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:news_getx/theme/app_colors.dart'; + +AppBar transparentAppBar({ + Widget? title, + Widget? leading, + List? actions, +}) { + return AppBar( + backgroundColor: Colors.transparent, + elevation: 0, + title: title != null + ? Center( + child: title, + ) + : null, + leading: leading, + actions: actions, + ); +} + +/// 10像素 Divider +Widget divider10Px({Color bgColor = AppColors.secondaryElement}) { + return Container( + height: 10.w, + decoration: BoxDecoration( + color: bgColor, + ), + ); +} diff --git a/lib/modules/widgets/button.dart b/lib/modules/widgets/button.dart new file mode 100644 index 0000000..68b88ba --- /dev/null +++ b/lib/modules/widgets/button.dart @@ -0,0 +1,110 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:news_getx/theme/app_borders.dart'; +import 'package:news_getx/theme/app_colors.dart'; +import 'package:news_getx/theme/app_radii.dart'; + +/// 扁平圆角按钮 +class FlatButton extends StatelessWidget { + final VoidCallback onPressed; + final double width; + final double height; + final Color gbColor; + final String title; + final Color fontColor; + final double fontSize; + final String fontName; + final FontWeight fontWeight; + + @override + Widget build(BuildContext context) { + return SizedBox( + width: width.w, + height: height.h, + child: TextButton( + onPressed: onPressed, + style: ButtonStyle( + textStyle: MaterialStateProperty.all(TextStyle(fontSize: 16.sp)), + foregroundColor: MaterialStateProperty.resolveWith((states) { + if (states.contains(MaterialState.focused) && + !states.contains(MaterialState.pressed)) { + return Colors.blue; + } else if (states.contains(MaterialState.pressed)) { + return Colors.deepPurple; + } + return fontColor; + }), + backgroundColor: MaterialStateProperty.resolveWith((states) { + if (states.contains(MaterialState.pressed)) { + return Colors.blue[200]; + } + return gbColor; + }), + shape: MaterialStateProperty.all(RoundedRectangleBorder( + borderRadius: Radii.k6pxRadius, + )), + ), + child: Text( + title, + textAlign: TextAlign.center, + style: TextStyle( + color: fontColor, + fontFamily: fontName, + fontWeight: fontWeight, + fontSize: fontSize.sp, + height: 1, + ), + ), + ), + ); + } + + FlatButton({ + required this.onPressed, + super.key, + this.width = 140, + this.height = 140, + this.gbColor = AppColors.primaryElement, + this.title = "button", + this.fontColor = AppColors.primaryElementText, + this.fontSize = 18, + this.fontName = "Montserrat", + this.fontWeight = FontWeight.w400, + }); +} + +/// 扁平圆角按钮 +class IconBorderFlatButton extends StatelessWidget { + final VoidCallback onPressed; + final String iconFileName; + final double width; + final double height; + + @override + Widget build(BuildContext context) { + return SizedBox( + width: width.w, + height: height.h, + child: TextButton( + onPressed: onPressed, + style: ButtonStyle( + shape: MaterialStateProperty.all(RoundedRectangleBorder( + borderRadius: Radii.k6pxRadius, + side: AppBorders.primaryBorder, + )), + ), + child: Image.asset( + "assets/images/icons-$iconFileName.png", + ), + ), + ); + } + + IconBorderFlatButton({ + required this.onPressed, + required this.iconFileName, + super.key, + this.width = 88, + this.height = 44, + }); +} diff --git a/lib/modules/widgets/input.dart b/lib/modules/widgets/input.dart new file mode 100644 index 0000000..ed3135b --- /dev/null +++ b/lib/modules/widgets/input.dart @@ -0,0 +1,93 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:news_getx/theme/app_colors.dart'; +import 'package:news_getx/theme/app_radii.dart'; + +/// 输入框 +Widget InputTextEdit({ + TextEditingController? controller, + TextInputType keyboardType = TextInputType.text, + String? hintText, + bool isPassword = false, + double marginTop = 15, + bool autoFocus = false, +}) { + return Container( + height: 44.h, + decoration: BoxDecoration( + color: AppColors.secondaryElement, + borderRadius: Radii.k6pxRadius, + ), + margin: EdgeInsets.only(top: marginTop.h), + child: TextField( + decoration: InputDecoration( + hintText: hintText, + border: InputBorder.none, + contentPadding: EdgeInsets.fromLTRB(20, 10, 0, 9), + ), + style: TextStyle( + color: AppColors.primaryText, + fontFamily: "Avenir", + fontWeight: FontWeight.w400, + fontSize: 18.sp, + ), + controller: controller, + autofocus: autoFocus, + keyboardType: keyboardType, + maxLines: 1, + autocorrect: false, + // 自动纠正 + obscureText: isPassword, // 隐藏输入内容, 密码框 + ), + ); +} + +/// email 输入框 +/// 背景白色,文字黑色,带阴影 +Widget inputEmailEdit({ + TextEditingController? controller, + TextInputType keyboardType = TextInputType.text, + String? hintText, + bool isPassword = false, + double marginTop = 15, + bool autofocus = false, +}) { + return Container( + height: 44.h, + margin: EdgeInsets.only(top: marginTop.h), + decoration: BoxDecoration( + color: AppColors.primaryBackground, + borderRadius: Radii.k6pxRadius, + boxShadow: [ + BoxShadow( + color: Color.fromARGB(41, 0, 0, 0), + offset: Offset(0, 1), + blurRadius: 0, + ), + ], + ), + child: TextField( + autofocus: autofocus, + controller: controller, + keyboardType: keyboardType, + decoration: InputDecoration( + hintText: hintText, + contentPadding: EdgeInsets.fromLTRB(20, 10, 0, 9), + border: InputBorder.none, + hintStyle: TextStyle( + color: AppColors.primaryText, + ), + ), + style: TextStyle( + color: AppColors.primaryText, + fontFamily: "Avenir", + fontWeight: FontWeight.w400, + fontSize: 18.sp, + ), + maxLines: 1, + autocorrect: false, + // 自动纠正 + obscureText: isPassword, // 隐藏输入内容, 密码框 + ), + ); +} diff --git a/lib/modules/widgets/toast.dart b/lib/modules/widgets/toast.dart new file mode 100644 index 0000000..42d5d2b --- /dev/null +++ b/lib/modules/widgets/toast.dart @@ -0,0 +1,22 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:fluttertoast/fluttertoast.dart'; + +Future toastInfo({ + required String msg, + Color backgroundColor = Colors.black, + Color textColor = Colors.white, +}) { + return Fluttertoast.showToast( + msg: msg, + toastLength: Toast.LENGTH_SHORT, + // 显示时间 安卓平台 + gravity: ToastGravity.TOP, + // 在屏幕上的位置 + timeInSecForIosWeb: 1, + // IOS平台显示时长 + backgroundColor: backgroundColor, + textColor: textColor, + fontSize: 16.sp, + ); +} diff --git a/lib/routes/app_pages.dart b/lib/routes/app_pages.dart new file mode 100644 index 0000000..8f1a93e --- /dev/null +++ b/lib/routes/app_pages.dart @@ -0,0 +1,29 @@ +import 'package:get/get.dart'; +import 'package:news_getx/modules/sign_in/sign_in_binding.dart'; +import 'package:news_getx/modules/sign_in/sign_in_page.dart'; +import 'package:news_getx/modules/sign_up/sign_up_binding.dart'; +import 'package:news_getx/modules/sign_up/sign_up_page.dart'; +import 'package:news_getx/modules/welcome/welcome_binding.dart'; +import 'package:news_getx/modules/welcome/welcome_page.dart'; + +part './app_routes.dart'; + +abstract class AppPages { + static final pages = [ + GetPage( + name: AppRoutes.Initial, + page: () => WelcomePage(), + binding: WelcomeBinding(), + ), + GetPage( + name: AppRoutes.Signin, + page: () => SignInPage(), + binding: SignInBinding(), + ), + GetPage( + name: AppRoutes.Signup, + page: () => SignUpPage(), + binding: SignUpBinding(), + ) + ]; +} diff --git a/lib/routes/app_routes.dart b/lib/routes/app_routes.dart new file mode 100644 index 0000000..3961b59 --- /dev/null +++ b/lib/routes/app_routes.dart @@ -0,0 +1,11 @@ +part of './app_pages.dart'; + +abstract class AppRoutes { + static const Initial = '/'; + static const Signin = '/sign_in'; + static const Signup = '/sign_up'; + static const NotFound = '/not_found'; + + static const Application = '/application'; + static const Category = '/category'; +} diff --git a/lib/theme/app_borders.dart b/lib/theme/app_borders.dart new file mode 100644 index 0000000..680688b --- /dev/null +++ b/lib/theme/app_borders.dart @@ -0,0 +1,9 @@ +import 'package:flutter/rendering.dart'; + +class AppBorders { + static const BorderSide primaryBorder = BorderSide( + color: Color.fromARGB(255, 230, 230, 231), + width: 1, + style: BorderStyle.solid, + ); +} \ No newline at end of file diff --git a/lib/theme/app_colors.dart b/lib/theme/app_colors.dart new file mode 100644 index 0000000..92b3506 --- /dev/null +++ b/lib/theme/app_colors.dart @@ -0,0 +1,70 @@ +import 'dart:ui'; + +class AppColors { + /// 主背景 白色 + static const Color primaryBackground = Color.fromARGB(255, 255, 255, 255); + + /// 主文本 灰色 + static const Color primaryText = Color.fromARGB(255, 45, 45, 47); + + /// 主控件-背景 蓝色 + static const Color primaryElement = Color.fromARGB(255, 41, 103, 255); + + /// 主控件-文本 白色 + static const Color primaryElementText = Color.fromARGB(255, 255, 255, 255); + + // ***************************************** + + /// 第二种控件-背景色 淡灰色 + static const Color secondaryElement = Color.fromARGB(255, 246, 246, 246); + + /// 第二种控件-文本 浅蓝色 + static const Color secondaryElementText = Color.fromARGB(255, 41, 103, 255); + + // ***************************************** + + /// 第三种控件-背景色 石墨色 + static const Color thirdElement = Color.fromARGB(255, 45, 45, 47); + + /// 第三种控件-文本 浅灰色2 + static const Color thirdElementText = Color.fromARGB(255, 141, 141, 142); + + // ***************************************** + + /// tabBar 默认颜色 灰色 + static const Color tabBarElement = Color.fromARGB(255, 208, 208, 208); + + /// tabCellSeparator 单元格底部分隔条 颜色 + static const Color tabCellSeparator = Color.fromARGB(255, 230, 230, 231); +} + + +class AppThemeColors { + /// 页面背景颜色 + static const Color scaffoldBackground = Color(0xFFFFFFFF); + + /// 主要背景颜色 + // static const Color primaryBackground = Color(0xFF5C78FF); + + /// 主要文本颜色 + static const Color primaryText = Color(0xFF333333); + + /// 次要文本颜色 + static const Color secondaryText = Color(0xFF74788D); + + /// 高亮颜色 + static const Color accentColor = Color(0xFF5C78FF); + + /// 次要颜色 + static const Color secondaryColor = Color(0xFFDEE3FF); + + /// 警告颜色 + static const Color warnColor = Color(0xFFFFB822); + + /// 边框颜色 + static const Color borderColor = Color(0xFFDEE3FF); + + static const Color pinkColor = Color(0xFFF77866); + + static const Color yellowColor = Color(0xFFFFB822); +} \ No newline at end of file diff --git a/lib/theme/app_radii.dart b/lib/theme/app_radii.dart new file mode 100644 index 0000000..9f2bb6c --- /dev/null +++ b/lib/theme/app_radii.dart @@ -0,0 +1,9 @@ +import 'package:flutter/cupertino.dart'; + +class Radii { + static const BorderRadiusGeometry k6pxRadius = + BorderRadius.all(Radius.circular(6)); + + static const BorderRadiusGeometry k54pxRadius = + BorderRadius.all(Radius.circular(54)); +} diff --git a/lib/theme/app_screen.dart b/lib/theme/app_screen.dart new file mode 100644 index 0000000..139597f --- /dev/null +++ b/lib/theme/app_screen.dart @@ -0,0 +1,2 @@ + + diff --git a/lib/theme/app_shadows.dart b/lib/theme/app_shadows.dart new file mode 100644 index 0000000..5d4ca59 --- /dev/null +++ b/lib/theme/app_shadows.dart @@ -0,0 +1,9 @@ +import 'package:flutter/rendering.dart'; + +class AppShadows { + static const BoxShadow primaryShadow = BoxShadow( + color: Color.fromARGB(38, 27, 27, 29), + offset: Offset(0, 5), + blurRadius: 10, + ); +} diff --git a/lib/theme/app_theme.dart b/lib/theme/app_theme.dart new file mode 100644 index 0000000..674f811 --- /dev/null +++ b/lib/theme/app_theme.dart @@ -0,0 +1,51 @@ +import 'package:flutter/material.dart'; +import 'package:news_getx/theme/app_colors.dart'; + + +class AppTheme { + static const horizontalMargin = 16.0; + static const radius = 10.0; + + + static ThemeData light = ThemeData( + brightness: Brightness.light, + scaffoldBackgroundColor: AppThemeColors.scaffoldBackground, + splashColor: Colors.transparent, + highlightColor: Colors.transparent, + primaryColor: AppThemeColors.accentColor, + colorScheme: ColorScheme.fromSwatch().copyWith( + secondary: AppThemeColors.accentColor, + ), + appBarTheme: AppBarTheme( + elevation: 0, + centerTitle: true, + backgroundColor: Colors.white, + iconTheme: IconThemeData( + color: AppThemeColors.primaryText, + ), + titleTextStyle: TextStyle( + color: AppThemeColors.primaryText, + fontSize: 20, + fontWeight: FontWeight.w500, + ), + toolbarTextStyle: TextStyle( + color: AppThemeColors.primaryText, + fontSize: 20, + fontWeight: FontWeight.w500, + ), + ), + bottomNavigationBarTheme: BottomNavigationBarThemeData( + backgroundColor: AppThemeColors.scaffoldBackground, + unselectedLabelStyle: TextStyle(fontSize: 12), + selectedLabelStyle: TextStyle(fontSize: 12), + unselectedItemColor: Color(0xffA2A5B9), + selectedItemColor: AppThemeColors.accentColor, + ), + tabBarTheme: TabBarTheme( + indicatorSize: TabBarIndicatorSize.label, + labelColor: AppThemeColors.accentColor, + unselectedLabelColor: AppThemeColors.secondaryText, + ), + ); + +} diff --git a/lib/utils/validator.dart b/lib/utils/validator.dart new file mode 100644 index 0000000..01b82e0 --- /dev/null +++ b/lib/utils/validator.dart @@ -0,0 +1,13 @@ +/// 检查邮箱格式 +bool isEmail(String? input) { + if (input == null || input.isEmpty) return false; + // 邮箱正则 + String regexEmail = "^\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*\$"; + return RegExp(regexEmail).hasMatch(input); +} + +/// 检查字符长度 +bool checkStringLength(String? input, int length) { + if (input == null || input.isEmpty) return false; + return input.length >= length; +} \ No newline at end of file diff --git a/pubspec.lock b/pubspec.lock new file mode 100644 index 0000000..5cefca1 --- /dev/null +++ b/pubspec.lock @@ -0,0 +1,663 @@ +# Generated by pub +# See https://dart.dev/tools/pub/glossary#lockfile +packages: + async: + dependency: transitive + description: + name: async + sha256: bfe67ef28df125b7dddcea62755991f807aa39a2492a23e1550161692950bbe0 + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.10.0" + boolean_selector: + dependency: transitive + description: + name: boolean_selector + sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.1.1" + cached_network_image: + dependency: "direct main" + description: + name: cached_network_image + sha256: fd3d0dc1d451f9a252b32d95d3f0c3c487bc41a75eba2e6097cb0b9c71491b15 + url: "https://pub.flutter-io.cn" + source: hosted + version: "3.2.3" + cached_network_image_platform_interface: + dependency: transitive + description: + name: cached_network_image_platform_interface + sha256: bb2b8403b4ccdc60ef5f25c70dead1f3d32d24b9d6117cfc087f496b178594a7 + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.0.0" + cached_network_image_web: + dependency: transitive + description: + name: cached_network_image_web + sha256: b8eb814ebfcb4dea049680f8c1ffb2df399e4d03bf7a352c775e26fa06e02fa0 + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.0.2" + characters: + dependency: transitive + description: + name: characters + sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.3.0" + clock: + dependency: transitive + description: + name: clock + sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.1.1" + collection: + dependency: transitive + description: + name: collection + sha256: "4a07be6cb69c84d677a6c3096fcf960cc3285a8330b4603e0d463d15d9bd934c" + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.17.1" + cookie_jar: + dependency: "direct main" + description: + name: cookie_jar + sha256: d1cc6516a190ba667941f722b6365d202caff3dacb38de24268b8d6ff1ec8a1d + url: "https://pub.flutter-io.cn" + source: hosted + version: "3.0.1" + crypto: + dependency: "direct main" + description: + name: crypto + sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab + url: "https://pub.flutter-io.cn" + source: hosted + version: "3.0.3" + cupertino_icons: + dependency: "direct main" + description: + name: cupertino_icons + sha256: e35129dc44c9118cee2a5603506d823bab99c68393879edb440e0090d07586be + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.0.5" + device_info: + dependency: "direct main" + description: + name: device_info + sha256: f4a8156cb7b7480d969cb734907d18b333c8f0bc0b1ad0b342cdcecf30d62c48 + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.0.3" + device_info_platform_interface: + dependency: transitive + description: + name: device_info_platform_interface + sha256: b148e0bf9640145d09a4f8dea96614076f889e7f7f8b5ecab1c7e5c2dbc73c1b + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.0.1" + dio: + dependency: "direct main" + description: + name: dio + sha256: "7d328c4d898a61efc3cd93655a0955858e29a0aa647f0f9e02d59b3bb275e2e8" + url: "https://pub.flutter-io.cn" + source: hosted + version: "4.0.6" + dio_cookie_manager: + dependency: "direct main" + description: + name: dio_cookie_manager + sha256: ed7ee3ba6cdb54599c8984d5a4ce09675c553ead6c28608eb54e38eec5b4f954 + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.0.0" + fake_async: + dependency: transitive + description: + name: fake_async + sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.3.1" + ffi: + dependency: transitive + description: + name: ffi + sha256: ed5337a5660c506388a9f012be0288fb38b49020ce2b45fe1f8b8323fe429f99 + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.0.2" + file: + dependency: transitive + description: + name: file + sha256: "1b92bec4fc2a72f59a8e15af5f52cd441e4a7860b49499d69dfa817af20e925d" + url: "https://pub.flutter-io.cn" + source: hosted + version: "6.1.4" + flutter: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + flutter_blurhash: + dependency: transitive + description: + name: flutter_blurhash + sha256: "05001537bd3fac7644fa6558b09ec8c0a3f2eba78c0765f88912882b1331a5c6" + url: "https://pub.flutter-io.cn" + source: hosted + version: "0.7.0" + flutter_cache_manager: + dependency: "direct main" + description: + name: flutter_cache_manager + sha256: "8207f27539deb83732fdda03e259349046a39a4c767269285f449ade355d54ba" + url: "https://pub.flutter-io.cn" + source: hosted + version: "3.3.1" + flutter_easyloading: + dependency: "direct main" + description: + name: flutter_easyloading + sha256: ba21a3c883544e582f9cc455a4a0907556714e1e9cf0eababfcb600da191d17c + url: "https://pub.flutter-io.cn" + source: hosted + version: "3.0.5" + flutter_lints: + dependency: "direct dev" + description: + name: flutter_lints + sha256: "2118df84ef0c3ca93f96123a616ae8540879991b8b57af2f81b76a7ada49b2a4" + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.0.2" + flutter_localizations: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + flutter_screenutil: + dependency: "direct main" + description: + name: flutter_screenutil + sha256: "0a122936b450324cbdfd51be0819cc6fcebb093eb65585e9cd92263f7a1a8a39" + url: "https://pub.flutter-io.cn" + source: hosted + version: "5.7.0" + flutter_spinkit: + dependency: transitive + description: + name: flutter_spinkit + sha256: b39c753e909d4796906c5696a14daf33639a76e017136c8d82bf3e620ce5bb8e + url: "https://pub.flutter-io.cn" + source: hosted + version: "5.2.0" + flutter_test: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" + flutter_web_plugins: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + fluttertoast: + dependency: "direct main" + description: + name: fluttertoast + sha256: "474f7d506230897a3cd28c965ec21c5328ae5605fc9c400cd330e9e9d6ac175c" + url: "https://pub.flutter-io.cn" + source: hosted + version: "8.2.2" + get: + dependency: "direct main" + description: + name: get + sha256: "2ba20a47c8f1f233bed775ba2dd0d3ac97b4cf32fc17731b3dfc672b06b0e92a" + url: "https://pub.flutter-io.cn" + source: hosted + version: "4.6.5" + http: + dependency: transitive + description: + name: http + sha256: "5895291c13fa8a3bd82e76d5627f69e0d85ca6a30dcac95c4ea19a5d555879c2" + url: "https://pub.flutter-io.cn" + source: hosted + version: "0.13.6" + http_parser: + dependency: transitive + description: + name: http_parser + sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" + url: "https://pub.flutter-io.cn" + source: hosted + version: "4.0.2" + intl: + dependency: "direct main" + description: + name: intl + sha256: a3715e3bc90294e971cb7dc063fbf3cd9ee0ebf8604ffeafabd9e6f16abbdbe6 + url: "https://pub.flutter-io.cn" + source: hosted + version: "0.18.0" + js: + dependency: transitive + description: + name: js + sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3 + url: "https://pub.flutter-io.cn" + source: hosted + version: "0.6.7" + lints: + dependency: transitive + description: + name: lints + sha256: "5e4a9cd06d447758280a8ac2405101e0e2094d2a1dbdd3756aec3fe7775ba593" + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.0.1" + loading_animations: + dependency: "direct main" + description: + name: loading_animations + sha256: c62a8c1fbbe5ade3ac2814128a9aa92ee784756b11ad9e6a915b673b90005cc8 + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.2.0" + matcher: + dependency: transitive + description: + name: matcher + sha256: c94db23593b89766cda57aab9ac311e3616cf87c6fa4e9749df032f66f30dcb8 + url: "https://pub.flutter-io.cn" + source: hosted + version: "0.12.14" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724 + url: "https://pub.flutter-io.cn" + source: hosted + version: "0.2.0" + meta: + dependency: transitive + description: + name: meta + sha256: "12307e7f0605ce3da64cf0db90e5fcab0869f3ca03f76be6bb2991ce0a55e82b" + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.9.0" + mime: + dependency: transitive + description: + name: mime + sha256: e4ff8e8564c03f255408decd16e7899da1733852a9110a58fe6d1b817684a63e + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.0.4" + octo_image: + dependency: transitive + description: + name: octo_image + sha256: "107f3ed1330006a3bea63615e81cf637433f5135a52466c7caa0e7152bca9143" + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.0.2" + package_info: + dependency: "direct main" + description: + name: package_info + sha256: "6c07d9d82c69e16afeeeeb6866fe43985a20b3b50df243091bfc4a4ad2b03b75" + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.0.2" + path: + dependency: transitive + description: + name: path + sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.8.3" + path_provider: + dependency: "direct main" + description: + name: path_provider + sha256: "3087813781ab814e4157b172f1a11c46be20179fcc9bea043e0fba36bc0acaa2" + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.0.15" + path_provider_android: + dependency: transitive + description: + name: path_provider_android + sha256: "2cec049d282c7f13c594b4a73976b0b4f2d7a1838a6dd5aaf7bd9719196bee86" + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.0.27" + path_provider_foundation: + dependency: transitive + description: + name: path_provider_foundation + sha256: "1995d88ec2948dac43edf8fe58eb434d35d22a2940ecee1a9fefcd62beee6eb3" + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.2.3" + path_provider_linux: + dependency: transitive + description: + name: path_provider_linux + sha256: ffbb8cc9ed2c9ec0e4b7a541e56fd79b138e8f47d2fb86815f15358a349b3b57 + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.1.11" + path_provider_platform_interface: + dependency: transitive + description: + name: path_provider_platform_interface + sha256: "57585299a729335f1298b43245842678cb9f43a6310351b18fb577d6e33165ec" + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.0.6" + path_provider_windows: + dependency: transitive + description: + name: path_provider_windows + sha256: "1cb68ba4cd3a795033de62ba1b7b4564dace301f952de6bfb3cd91b202b6ee96" + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.1.7" + permission_handler: + dependency: "direct main" + description: + name: permission_handler + sha256: e968207ce71d8b40d719aeca3e5a8b684494ecbe9a577dd67cc701216bcccf0a + url: "https://pub.flutter-io.cn" + source: hosted + version: "7.2.0" + permission_handler_platform_interface: + dependency: transitive + description: + name: permission_handler_platform_interface + sha256: "463a07cb7cc6c758a7a1c7da36ce666bb80a0b4b5e92df0fa36872e0ed456993" + url: "https://pub.flutter-io.cn" + source: hosted + version: "3.11.1" + platform: + dependency: transitive + description: + name: platform + sha256: "4a451831508d7d6ca779f7ac6e212b4023dd5a7d08a27a63da33756410e32b76" + url: "https://pub.flutter-io.cn" + source: hosted + version: "3.1.0" + plugin_platform_interface: + dependency: transitive + description: + name: plugin_platform_interface + sha256: "6a2128648c854906c53fa8e33986fc0247a1116122f9534dd20e3ab9e16a32bc" + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.1.4" + process: + dependency: transitive + description: + name: process + sha256: "53fd8db9cec1d37b0574e12f07520d582019cb6c44abf5479a01505099a34a09" + url: "https://pub.flutter-io.cn" + source: hosted + version: "4.2.4" + pull_to_refresh: + dependency: "direct main" + description: + name: pull_to_refresh + sha256: bbadd5a931837b57739cf08736bea63167e284e71fb23b218c8c9a6e042aad12 + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.0.0" + rxdart: + dependency: transitive + description: + name: rxdart + sha256: "0c7c0cedd93788d996e33041ffecda924cc54389199cde4e6a34b440f50044cb" + url: "https://pub.flutter-io.cn" + source: hosted + version: "0.27.7" + sentry: + dependency: "direct main" + description: + name: sentry + sha256: "377edcc3d7910745849b1621dcec7d34fc27b6c03e9e9009499dc2968ce19cd7" + url: "https://pub.flutter-io.cn" + source: hosted + version: "5.1.0" + share: + dependency: "direct main" + description: + name: share + sha256: "97e6403f564ed1051a01534c2fc919cb6e40ea55e60a18ec23cee6e0ce19f4be" + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.0.4" + shared_preferences: + dependency: "direct main" + description: + name: shared_preferences + sha256: "0344316c947ffeb3a529eac929e1978fcd37c26be4e8468628bac399365a3ca1" + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.2.0" + shared_preferences_android: + dependency: transitive + description: + name: shared_preferences_android + sha256: fe8401ec5b6dcd739a0fe9588802069e608c3fdbfd3c3c93e546cf2f90438076 + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.2.0" + shared_preferences_foundation: + dependency: transitive + description: + name: shared_preferences_foundation + sha256: b046999bf0ff58f04c364491bb803dcfa8f42e47b19c75478f53d323684a8cc1 + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.3.1" + shared_preferences_linux: + dependency: transitive + description: + name: shared_preferences_linux + sha256: "71d6806d1449b0a9d4e85e0c7a917771e672a3d5dc61149cc9fac871115018e1" + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.3.0" + shared_preferences_platform_interface: + dependency: transitive + description: + name: shared_preferences_platform_interface + sha256: "23b052f17a25b90ff2b61aad4cc962154da76fb62848a9ce088efe30d7c50ab1" + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.3.0" + shared_preferences_web: + dependency: transitive + description: + name: shared_preferences_web + sha256: "7347b194fb0bbeb4058e6a4e87ee70350b6b2b90f8ac5f8bd5b3a01548f6d33a" + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.2.0" + shared_preferences_windows: + dependency: transitive + description: + name: shared_preferences_windows + sha256: f95e6a43162bce43c9c3405f3eb6f39e5b5d11f65fab19196cf8225e2777624d + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.3.0" + sky_engine: + dependency: transitive + description: flutter + source: sdk + version: "0.0.99" + source_span: + dependency: transitive + description: + name: source_span + sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250 + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.9.1" + sqflite: + dependency: transitive + description: + name: sqflite + sha256: b4d6710e1200e96845747e37338ea8a819a12b51689a3bcf31eff0003b37a0b9 + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.2.8+4" + sqflite_common: + dependency: transitive + description: + name: sqflite_common + sha256: "8f7603f3f8f126740bc55c4ca2d1027aab4b74a1267a3e31ce51fe40e3b65b8f" + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.4.5+1" + stack_trace: + dependency: transitive + description: + name: stack_trace + sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5 + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.11.0" + stream_channel: + dependency: transitive + description: + name: stream_channel + sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8" + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.1.1" + string_scanner: + dependency: transitive + description: + name: string_scanner + sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.2.0" + synchronized: + dependency: transitive + description: + name: synchronized + sha256: "5fcbd27688af6082f5abd611af56ee575342c30e87541d0245f7ff99faa02c60" + url: "https://pub.flutter-io.cn" + source: hosted + version: "3.1.0" + term_glyph: + dependency: transitive + description: + name: term_glyph + sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.2.1" + test_api: + dependency: transitive + description: + name: test_api + sha256: "6182294da5abf431177fccc1ee02401f6df30f766bc6130a0852c6b6d7ee6b2d" + url: "https://pub.flutter-io.cn" + source: hosted + version: "0.4.18" + typed_data: + dependency: transitive + description: + name: typed_data + sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.3.2" + uuid: + dependency: transitive + description: + name: uuid + sha256: "648e103079f7c64a36dc7d39369cabb358d377078a051d6ae2ad3aa539519313" + url: "https://pub.flutter-io.cn" + source: hosted + version: "3.0.7" + vector_math: + dependency: transitive + description: + name: vector_math + sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.1.4" + webview_flutter: + dependency: "direct main" + description: + name: webview_flutter + sha256: "789d52bd789373cc1e100fb634af2127e86c99cf9abde09499743270c5de8d00" + url: "https://pub.flutter-io.cn" + source: hosted + version: "4.2.2" + webview_flutter_android: + dependency: transitive + description: + name: webview_flutter_android + sha256: "1c93e96f3069bacdc734fad6b7e1d3a480fd516a3ae5b8858becf7f07515a2f3" + url: "https://pub.flutter-io.cn" + source: hosted + version: "3.8.2" + webview_flutter_platform_interface: + dependency: transitive + description: + name: webview_flutter_platform_interface + sha256: "656e2aeaef318900fffd21468b6ddc7958c7092a642f0e7220bac328b70d4a81" + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.3.1" + webview_flutter_wkwebview: + dependency: transitive + description: + name: webview_flutter_wkwebview + sha256: "0ede6bafb857b7608e65f4ad7bcf67ad03375a02d038c59929898e514591faca" + url: "https://pub.flutter-io.cn" + source: hosted + version: "3.6.3" + win32: + dependency: transitive + description: + name: win32 + sha256: "5a751eddf9db89b3e5f9d50c20ab8612296e4e8db69009788d6c8b060a84191c" + url: "https://pub.flutter-io.cn" + source: hosted + version: "4.1.4" + xdg_directories: + dependency: transitive + description: + name: xdg_directories + sha256: ee1505df1426458f7f60aac270645098d318a8b4766d85fde75f76f2e21807d1 + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.0.0" +sdks: + dart: ">=3.0.0-322.0.dev <4.0.0" + flutter: ">=3.3.0" diff --git a/pubspec.yaml b/pubspec.yaml new file mode 100644 index 0000000..9f8665f --- /dev/null +++ b/pubspec.yaml @@ -0,0 +1,168 @@ +name: news_getx +description: 基于猫哥的开源代码进行学习,好像是学的第二次了。 +# The following line prevents the package from being accidentally published to +# pub.dev using `flutter pub publish`. This is preferred for private packages. +publish_to: 'none' # Remove this line if you wish to publish to pub.dev + +# The following defines the version and build number for your application. +# A version number is three numbers separated by dots, like 1.2.43 +# followed by an optional build number separated by a +. +# Both the version and the builder number may be overridden in flutter +# build by specifying --build-name and --build-number, respectively. +# In Android, build-name is used as versionName while build-number used as versionCode. +# Read more about Android versioning at https://developer.android.com/studio/publish/versioning +# In iOS, build-name is used as CFBundleShortVersionString while build-number is used as CFBundleVersion. +# Read more about iOS versioning at +# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html +# In Windows, build-name is used as the major, minor, and patch parts +# of the product and file versions while build-number is used as the build suffix. +version: 1.0.0+1 + +environment: + sdk: '>=3.0.0-322.0.dev <4.0.0' + +# Dependencies specify other packages that your package needs in order to work. +# To automatically upgrade your package dependencies to the latest versions +# consider running `flutter pub upgrade --major-versions`. Alternatively, +# dependencies can be manually updated by changing the version numbers below to +# the latest version available on pub.dev. To see which dependencies have newer +# versions available, run `flutter pub outdated`. +dependencies: + flutter: + sdk: flutter + + flutter_localizations: + sdk: flutter + + + # The following adds the Cupertino Icons font to your application. + # Use with the CupertinoIcons class for iOS style icons. + cupertino_icons: ^1.0.2 + + # GetX + get: ^4.6.5 + + # 屏幕适配 + flutter_screenutil: ^5.0.0+2 + + # http + dio: ^4.0.0 + dio_cookie_manager: ^2.0.0 + cookie_jar: ^3.0.1 + + # 日期 + intl: ^0.18.0 + + # 下拉刷新 + pull_to_refresh: ^2.0.0 + + # toast + fluttertoast: ^8.0.7 + + # easyloading + flutter_easyloading: ^3.0.3 + + # 缓存 + shared_preferences: ^2.0.5 + cached_network_image: ^3.0.0 + flutter_cache_manager: ^3.0.2 + + # 加密安全 SHA + crypto: ^3.0.1 + + # loading + loading_animations: ^2.2.0 + + # share + share: ^2.0.1 + + # 设备信息 + device_info: ^2.0.0 + + # 包信息 + package_info: ^2.0.0 + + # 路径查询 + path_provider: ^2.0.1 + + # permission 权限 + permission_handler: ^7.1.0 + + # 错误收集 + sentry: ^5.0.0 + + # webView + webview_flutter: ^4.2.2 + + # 通过 scheme 打开APP 获取 参数 +# uni_links: ^0.5.1 + +dev_dependencies: + flutter_test: + sdk: flutter + + # The "flutter_lints" package below contains a set of recommended lints to + # encourage good coding practices. The lint set provided by the package is + # activated in the `analysis_options.yaml` file located at the root of your + # package. See that file for information about deactivating specific lint + # rules and activating additional ones. + flutter_lints: ^2.0.0 + + +# For information on the generic Dart part of this file, see the +# following page: https://dart.dev/tools/pub/pubspec + +# The following section is specific to Flutter packages. +flutter: + + # The following line ensures that the Material Icons font is + # included with your application, so that you can use the icons in + # the material Icons class. + uses-material-design: true + + # To add assets to your application, add an assets section, like this: + # assets: + # - images/a_dot_burr.jpeg + # - images/a_dot_ham.jpeg + + # An image asset can refer to one or more resolution-specific "variants", see + # https://flutter.dev/assets-and-images/#resolution-aware + + # For details regarding adding assets from package dependencies, see + # https://flutter.dev/assets-and-images/#from-packages + + # To add custom fonts to your application, add a fonts section here, + # in this "flutter" section. Each entry in this list should have a + # "family" key with the font family name, and a "fonts" key with a + # list giving the asset and other descriptors for the font. For + # example: + # fonts: + # - family: Schyler + # fonts: + # - asset: fonts/Schyler-Regular.ttf + # - asset: fonts/Schyler-Italic.ttf + # style: italic + # - family: Trajan Pro + # fonts: + # - asset: fonts/TrajanPro.ttf + # - asset: fonts/TrajanPro_Bold.ttf + # weight: 700 + assets: + - assets/images/ + + fonts: + - family: Avenir + fonts: + - asset: assets/fonts/Avenir-Book.ttf + weight: 400 # normal + - family: Montserrat + fonts: + - asset: assets/fonts/Montserrat-Medium.ttf + weight: 500 + - asset: assets/fonts/Montserrat-SemiBold.ttf + weight: 600 + - family: Iconfont + fonts: + - asset: assets/fonts/iconfont.ttf + # For details regarding fonts from package dependencies, + # see https://flutter.dev/custom-fonts/#from-packages diff --git a/test/widget_test.dart b/test/widget_test.dart new file mode 100644 index 0000000..28b1d6f --- /dev/null +++ b/test/widget_test.dart @@ -0,0 +1,30 @@ +// This is a basic Flutter widget test. +// +// To perform an interaction with a widget in your test, use the WidgetTester +// utility in the flutter_test package. For example, you can send tap and scroll +// gestures. You can also use WidgetTester to find child widgets in the widget +// tree, read text, and verify that the values of widget properties are correct. + +import 'package:flutter/material.dart'; +import 'package:flutter_test/flutter_test.dart'; + +import 'package:news_getx/main.dart'; + +void main() { + testWidgets('Counter increments smoke test', (WidgetTester tester) async { + // Build our app and trigger a frame. + await tester.pumpWidget(const MyApp()); + + // Verify that our counter starts at 0. + expect(find.text('0'), findsOneWidget); + expect(find.text('1'), findsNothing); + + // Tap the '+' icon and trigger a frame. + await tester.tap(find.byIcon(Icons.add)); + await tester.pump(); + + // Verify that our counter has incremented. + expect(find.text('0'), findsNothing); + expect(find.text('1'), findsOneWidget); + }); +} diff --git a/web/favicon.png b/web/favicon.png new file mode 100644 index 0000000..8aaa46a Binary files /dev/null and b/web/favicon.png differ diff --git a/web/icons/Icon-192.png b/web/icons/Icon-192.png new file mode 100644 index 0000000..b749bfe Binary files /dev/null and b/web/icons/Icon-192.png differ diff --git a/web/icons/Icon-512.png b/web/icons/Icon-512.png new file mode 100644 index 0000000..88cfd48 Binary files /dev/null and b/web/icons/Icon-512.png differ diff --git a/web/icons/Icon-maskable-192.png b/web/icons/Icon-maskable-192.png new file mode 100644 index 0000000..eb9b4d7 Binary files /dev/null and b/web/icons/Icon-maskable-192.png differ diff --git a/web/icons/Icon-maskable-512.png b/web/icons/Icon-maskable-512.png new file mode 100644 index 0000000..d69c566 Binary files /dev/null and b/web/icons/Icon-maskable-512.png differ diff --git a/web/index.html b/web/index.html new file mode 100644 index 0000000..cf08a32 --- /dev/null +++ b/web/index.html @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + news_getx + + + + + + + + + + diff --git a/web/manifest.json b/web/manifest.json new file mode 100644 index 0000000..152e356 --- /dev/null +++ b/web/manifest.json @@ -0,0 +1,35 @@ +{ + "name": "news_getx", + "short_name": "news_getx", + "start_url": ".", + "display": "standalone", + "background_color": "#0175C2", + "theme_color": "#0175C2", + "description": "基于猫哥的开源代码进行学习,好像是学的第二次了。", + "orientation": "portrait-primary", + "prefer_related_applications": false, + "icons": [ + { + "src": "icons/Icon-192.png", + "sizes": "192x192", + "type": "image/png" + }, + { + "src": "icons/Icon-512.png", + "sizes": "512x512", + "type": "image/png" + }, + { + "src": "icons/Icon-maskable-192.png", + "sizes": "192x192", + "type": "image/png", + "purpose": "maskable" + }, + { + "src": "icons/Icon-maskable-512.png", + "sizes": "512x512", + "type": "image/png", + "purpose": "maskable" + } + ] +}