Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(flutter_weather): add top level weather barrel file #4306

Merged
merged 4 commits into from
Jan 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
import { Code } from '@astrojs/starlight/components';

const code = `
export 'models/models.dart';
`;
---

<Code code={code} lang="dart" title="lib/weather/weather.dart" />
5 changes: 5 additions & 0 deletions docs/src/content/docs/tutorials/flutter-weather.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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`);

<WeatherBarrelDartSnippet />

### Weather

We will use `HydratedCubit` to enable our app to remember its application state, even after it's been closed and reopened.
Expand Down