You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+8-9Lines changed: 8 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -92,23 +92,22 @@ Get started for free and purchase when you're ready to launch!
92
92
```
93
93
4. **Run the app:**
94
94
95
-
### Running the App
95
+
To run the app, first selectyour desired environment in`lib/main.dart`:
96
96
97
-
To run the app, first selectyour desired environment in`lib/main.dart`:
97
+
```dart
98
+
// lib/main.dart
98
99
99
-
```dart
100
-
// lib/main.dart
101
-
102
-
// Use `AppEnvironment.demo` to run with in-memory data (no API needed).
103
-
// Use `AppEnvironment.development` to connect to a local backend API.
104
-
const appEnvironment = AppEnvironment.demo;
100
+
// Use `AppEnvironment.demo` to run with in-memory data (no API needed).
101
+
// Use `AppEnvironment.development` to connect to a local backend API.
102
+
// Use `AppEnvironment.production` to connect to a live backend API.
103
+
const appEnvironment = AppEnvironment.demo;
105
104
```
106
105
107
106
Then, run the app from your terminal:
108
107
```bash
109
108
flutter run
110
109
```
111
-
*(Note: For `development` environment, ensure the [backend service](https://github.com/flutter-news-app-full-source-code/flutter-news-app-api-server-full-source-code) is running.)*
110
+
*(Note: For `development/production` environment, ensure the [backend service](https://github.com/flutter-news-app-full-source-code/flutter-news-app-api-server-full-source-code) is running.)*
0 commit comments