diff --git a/docs/src/components/tutorials/flutter-weather/WeatherBarrelDartSnippet.astro b/docs/src/components/tutorials/flutter-weather/WeatherBarrelDartSnippet.astro new file mode 100644 index 00000000000..da1bd7a9cfa --- /dev/null +++ b/docs/src/components/tutorials/flutter-weather/WeatherBarrelDartSnippet.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..da0467e453e 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 WeatherBarrelDartSnippet from '~/components/tutorials/flutter-weather/WeatherBarrelDartSnippet.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" /> +Then, let's create a top-level weather barrel 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.