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: add top level file guide to flutter_weather #4306

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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 WeatherWeatherDartSnippet from '~/components/tutorials/flutter-weather/WeatherWeatherDartSnippet.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"
/>

Also create the top file (`flutter_weather/lib/weather/weather.dart`);

<WeatherWeatherDartSnippet />

### Weather

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