入门
本项目是 Flutter 应用程序的起点。
导航与路由
- Flutter Navigator 只是一个带有特殊方法的堆栈,例如(future,futurebuilder,theme 等)。
- 屏幕/路由只是小部件。
- 从一个路由导航到另一个路由定义了应用程序的工作流程。
状态管理
- 无状态/有状态小部件。
- Flutter 通过反映当前状态来反映其 UI。
- 状态在构建小部件时被读取,并且可以使用 setState() 为有状态小部件更改。
面向对象的方法
- 通过将各种功能绑定到类并创建它们的实例来处理各种功能。
- 代码可重用性,减少冗余。
使用第三方软件包
- 使用外部软件包为应用程序提供各种有用的功能。
- 让应用程序脱颖而出。
使用的依赖
目录结构
Know More
|
|-- lib
| |-- components
| | |-- customListTile.dart
| | `-- DrawerTile.dart
| |
| |-- models
| | |-- article_model.dart
| | `-- source_model.dart
| |
| |-- pages
| | |-- article_details_page.dart
| | |-- HomePage.dart
| | `-- NewsPage.dart
| |
| |-- services
| | `-- api_service.dart
| |
| `-- main.dart
|
`-- pubspec.yaml
功能
- 日(亮)和月(暗)主题
- 印度各地最新新闻摘要
- 抽屉,方便选择新闻
- 商业
- 娱乐
- 体育
- 健康
- 科学
- 技术
- WebView 阅读详细新闻
先决条件
要从头开始构建此应用程序,您需要在计算机上安装 Flutter 和 Dart SDK:Flutter, Dart。除此之外,您还需要一个编辑器来处理代码,例如 VSCode 或 IntelliJ IDEA。
如何运行此应用程序
# Clone this repository
$ git clone https://github.com/Kashish0401/flutter_news_app
# Install dependencies
$ flutter pub get
# Run the APP on the open device (Android or IOS)
$ flutter run


