From eeae290c1305688f0b293efef05f3ca4c010eced Mon Sep 17 00:00:00 2001 From: Eason Date: Sun, 29 Dec 2024 16:37:36 +0800 Subject: [PATCH] docs: add top level file guide to flutter_weather --- .../flutter-weather/WeatherWeatherDartSnippet.astro | 9 +++++++++ docs/src/content/docs/tutorials/flutter-weather.mdx | 5 +++++ 2 files changed, 14 insertions(+) create mode 100644 docs/src/components/tutorials/flutter-weather/WeatherWeatherDartSnippet.astro diff --git a/docs/src/components/tutorials/flutter-weather/WeatherWeatherDartSnippet.astro b/docs/src/components/tutorials/flutter-weather/WeatherWeatherDartSnippet.astro new file mode 100644 index 00000000000..da1bd7a9cfa --- /dev/null +++ b/docs/src/components/tutorials/flutter-weather/WeatherWeatherDartSnippet.astro @@ -0,0 +1,9 @@ +--- +import { Code } from '@astrojs/starlight/components'; + +const code = ` +export 'models/models.dart'; +`; +--- + + diff --git a/docs/src/content/docs/tutorials/flutter-weather.mdx b/docs/src/content/docs/tutorials/flutter-weather.mdx index bf81f88a468..fc720ca81bd 100644 --- a/docs/src/content/docs/tutorials/flutter-weather.mdx +++ b/docs/src/content/docs/tutorials/flutter-weather.mdx @@ -25,6 +25,7 @@ import FlutterCreateRepositorySnippet from '~/components/tutorials/flutter-weath import RepositoryModelsBarrelTreeSnippet from '~/components/tutorials/flutter-weather/RepositoryModelsBarrelTreeSnippet.astro'; import WeatherRepositoryLibrarySnippet from '~/components/tutorials/flutter-weather/WeatherRepositoryLibrarySnippet.astro'; import WeatherCubitTreeSnippet from '~/components/tutorials/flutter-weather/WeatherCubitTreeSnippet.astro'; +import WeatherWeatherDartSnippet from '~/components/tutorials/flutter-weather/WeatherWeatherDartSnippet.astro'; ![advanced](https://img.shields.io/badge/level-advanced-red.svg) @@ -465,6 +466,10 @@ Let's export our models from the barrel file (`flutter_weather/lib/weather/model title="lib/weather/models/models.dart" /> +Also create the top file (`flutter_weather/lib/weather/weather.dart`); + + + ### Weather We will use `HydratedCubit` to enable our app to remember its application state, even after it's been closed and reopened.