Skip to content

Commit b9ebc1d

Browse files
committed
Merge branch 'main' into feat/readme-cleanup
2 parents 4e3e726 + b1fbc7c commit b9ebc1d

19 files changed

+20
-37
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
## 0.6.8-wip
22

33
* Require Dart 3.5 or later.
4+
* Remove dependency on `package:gap`.
45

56
## 0.6.7
67

analysis_options.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
1-
analyzer:
2-
errors:
3-
library_private_types_in_public_api: ignore
41
include: package:flutter_lints/flutter.yaml

example/analysis_options.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
1-
analyzer:
2-
errors:
3-
library_private_types_in_public_api: ignore
41
include: package:flutter_lints/flutter.yaml

example/lib/demo/api_key_page.dart

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import 'package:flutter/material.dart';
22
import 'package:flutter/services.dart';
3-
import 'package:gap/gap.dart';
43
import 'package:url_launcher/url_launcher.dart';
54

65
class GeminiApiKeyPage extends StatefulWidget {
@@ -57,7 +56,7 @@ class _GeminiApiKeyPageState extends State<GeminiApiKeyPage> {
5756
child: Text('(or copy the URL above by tapping HERE)'),
5857
),
5958
),
60-
const Gap(16),
59+
const SizedBox(height: 16),
6160
const Text('Paste your API key here:'),
6261
SizedBox(
6362
width: 300,
@@ -74,7 +73,7 @@ class _GeminiApiKeyPageState extends State<GeminiApiKeyPage> {
7473
: null,
7574
),
7675
),
77-
const Gap(16),
76+
const SizedBox(height: 16),
7877
ElevatedButton(
7978
onPressed: _isValidApiKey()
8079
? () => widget.onApiKey(_controller.text)

example/lib/recipes/pages/edit_recipe_page.dart

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import 'dart:convert';
66

77
import 'package:flutter/material.dart';
88
import 'package:flutter_ai_toolkit/flutter_ai_toolkit.dart';
9-
import 'package:gap/gap.dart';
109
import 'package:go_router/go_router.dart';
1110
import 'package:google_generative_ai/google_generative_ai.dart';
1211
import 'package:uuid/uuid.dart';
@@ -25,7 +24,7 @@ class EditRecipePage extends StatefulWidget {
2524
final Recipe recipe;
2625

2726
@override
28-
_EditRecipePageState createState() => _EditRecipePageState();
27+
State<EditRecipePage> createState() => _EditRecipePageState();
2928
}
3029

3130
class _EditRecipePageState extends State<EditRecipePage> {
@@ -150,7 +149,7 @@ When you generate a recipe, you should generate a JSON object.
150149
),
151150
maxLines: null,
152151
),
153-
const Gap(16),
152+
const SizedBox(height: 16),
154153
OverflowBar(
155154
spacing: 16,
156155
children: [
@@ -210,9 +209,9 @@ When you generate a recipe, you should generate a JSON object.
210209
title: Text(recipe.title),
211210
content: Column(
212211
crossAxisAlignment: CrossAxisAlignment.start,
212+
spacing: 16,
213213
children: [
214214
const Text('Modifications:'),
215-
const Gap(16),
216215
Text(_wrapText(modifications)),
217216
],
218217
),

example/lib/recipes/pages/home_page.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class HomePage extends StatefulWidget {
1616
const HomePage({super.key});
1717

1818
@override
19-
_HomePageState createState() => _HomePageState();
19+
State<HomePage> createState() => _HomePageState();
2020
}
2121

2222
class _HomePageState extends State<HomePage> {

example/lib/recipes/views/recipe_content_view.dart

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// found in the LICENSE file.
44

55
import 'package:flutter/material.dart';
6-
import 'package:gap/gap.dart';
76

87
import '../data/recipe_data.dart';
98

@@ -25,18 +24,18 @@ class RecipeContentView extends StatelessWidget {
2524
? SingleChildScrollView(
2625
child: Column(
2726
crossAxisAlignment: CrossAxisAlignment.start,
27+
spacing: 16,
2828
children: [
2929
_RecipeIngredientsView(recipe),
30-
const Gap(16),
3130
_RecipeInstructionsView(recipe),
3231
],
3332
),
3433
)
3534
: Row(
3635
crossAxisAlignment: CrossAxisAlignment.start,
36+
spacing: 16,
3737
children: [
3838
Expanded(child: _RecipeIngredientsView(recipe)),
39-
const Gap(16),
4039
Expanded(child: _RecipeInstructionsView(recipe)),
4140
],
4241
),

example/lib/recipes/views/recipe_list_view.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class RecipeListView extends StatefulWidget {
1515
const RecipeListView({super.key, required this.searchText});
1616

1717
@override
18-
_RecipeListViewState createState() => _RecipeListViewState();
18+
State<RecipeListView> createState() => _RecipeListViewState();
1919
}
2020

2121
class _RecipeListViewState extends State<RecipeListView> {

example/lib/recipes/views/recipe_response_view.dart

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import 'dart:convert';
22

33
import 'package:flutter/material.dart';
44
import 'package:flutter_markdown/flutter_markdown.dart';
5-
import 'package:gap/gap.dart';
65

76
import '../data/recipe_data.dart';
87
import '../data/recipe_repository.dart';
@@ -35,7 +34,6 @@ class RecipeResponseView extends StatelessWidget {
3534
// extract the recipe
3635
final json = recipeWithText['recipe'] as Map<String, dynamic>;
3736
final recipe = Recipe.fromJson(json);
38-
children.add(const Gap(16));
3937
children.add(Column(
4038
crossAxisAlignment: CrossAxisAlignment.start,
4139
children: [
@@ -46,12 +44,10 @@ class RecipeResponseView extends StatelessWidget {
4644
));
4745

4846
// add a button to add the recipe to the list
49-
children.add(const Gap(16));
5047
children.add(OutlinedButton(
5148
onPressed: () => RecipeRepository.addNewRecipe(recipe),
5249
child: const Text('Add Recipe'),
5350
));
54-
children.add(const Gap(16));
5551
}
5652
} catch (e) {
5753
debugPrint('Error parsing response: $e');
@@ -74,6 +70,7 @@ class RecipeResponseView extends StatelessWidget {
7470

7571
return Column(
7672
crossAxisAlignment: CrossAxisAlignment.start,
73+
spacing: 16,
7774
children: children,
7875
);
7976
}

example/lib/recipes/views/recipe_view.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// found in the LICENSE file.
44

55
import 'package:flutter/material.dart';
6-
import 'package:gap/gap.dart';
76

87
import '../data/recipe_data.dart';
98
import 'recipe_content_view.dart';
@@ -52,7 +51,7 @@ class RecipeView extends StatelessWidget {
5251
],
5352
),
5453
),
55-
const Gap(16),
54+
const SizedBox(height: 16),
5655
],
5756
),
5857
],

0 commit comments

Comments
 (0)