Skip to content
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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.5.2
* Fixed creation and editing of suggestions
* Added secondary button customization

## 0.5.1
* Updates to support flutter version 3.32.1
* Edge-to-edge mode fixes on Android
Expand Down
11 changes: 11 additions & 0 deletions example/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Example",
"request": "launch",
"type": "dart",
"program": "lib/main.dart",
},
]
}
56 changes: 28 additions & 28 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ packages:
dependency: transitive
description:
name: args
sha256: "7cf60b9f0cc88203c5a190b4cd62a99feea42759a7fa695010eb5de1c0b2252a"
sha256: d0481093c50b1da8910eb0bb301626d4d8eb7284aa739614d2b394ee09e3ea04
url: "https://pub.dev"
source: hosted
version: "2.5.0"
version: "2.7.0"
async:
dependency: transitive
description:
Expand Down Expand Up @@ -61,10 +61,10 @@ packages:
dependency: transitive
description:
name: equatable
sha256: c2b87cb7756efdf69892005af546c56c0b5037f54d2a88269b4f347a505e3ca2
sha256: "567c64b3cb4cf82397aac55f4f0cbd3ca20d77c6c03bedbc4ceaddc08904aef7"
url: "https://pub.dev"
source: hosted
version: "2.0.5"
version: "2.0.7"
fake_async:
dependency: transitive
description:
Expand All @@ -90,10 +90,10 @@ packages:
dependency: transitive
description:
name: flutter_svg
sha256: "7b4ca6cf3304575fe9c8ec64813c8d02ee41d2afe60bcfe0678bcb5375d596a2"
sha256: cd57f7969b4679317c17af6fd16ee233c1e60a82ed209d8a475c54fd6fd6f845
url: "https://pub.dev"
source: hosted
version: "2.0.10+1"
version: "2.2.0"
flutter_test:
dependency: "direct dev"
description: flutter
Expand All @@ -103,18 +103,18 @@ packages:
dependency: transitive
description:
name: http
sha256: "761a297c042deedc1ffbb156d6e2af13886bb305c2a343a4d972504cd67dd938"
sha256: "2c11f3f94c687ee9bad77c171151672986360b2b001d109814ee7140b2cf261b"
url: "https://pub.dev"
source: hosted
version: "1.2.1"
version: "1.4.0"
http_parser:
dependency: transitive
description:
name: http_parser
sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b"
sha256: "178d74305e7866013777bab2c3d8726205dc5a4dd935297175b19a23a2e66571"
url: "https://pub.dev"
source: hosted
version: "4.0.2"
version: "4.1.2"
intl:
dependency: "direct main"
description:
Expand Down Expand Up @@ -191,18 +191,18 @@ packages:
dependency: transitive
description:
name: path_parsing
sha256: e3e67b1629e6f7e8100b367d3db6ba6af4b1f0bb80f64db18ef1fbabd2fa9ccf
sha256: "883402936929eac138ee0a45da5b0f2c80f89913e6dc3bf77eb65b84b409c6ca"
url: "https://pub.dev"
source: hosted
version: "1.0.1"
version: "1.1.0"
petitparser:
dependency: transitive
description:
name: petitparser
sha256: c15605cd28af66339f8eb6fbe0e541bfe2d1b72d5825efc6598f3e0a31b9ad27
sha256: "07c8f0b1913bcde1ff0d26e57ace2f3012ccbf2b204e070290dad3bb22797646"
url: "https://pub.dev"
source: hosted
version: "6.0.2"
version: "6.1.0"
sky_engine:
dependency: transitive
description: flutter
Expand Down Expand Up @@ -246,7 +246,7 @@ packages:
path: ".."
relative: true
source: path
version: "0.5.1"
version: "0.5.2"
term_glyph:
dependency: transitive
description:
Expand All @@ -267,34 +267,34 @@ packages:
dependency: transitive
description:
name: typed_data
sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c
sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006
url: "https://pub.dev"
source: hosted
version: "1.3.2"
version: "1.4.0"
vector_graphics:
dependency: transitive
description:
name: vector_graphics
sha256: "32c3c684e02f9bc0afb0ae0aa653337a2fe022e8ab064bcd7ffda27a74e288e3"
sha256: a4f059dc26fc8295b5921376600a194c4ec7d55e72f2fe4c7d2831e103d461e6
url: "https://pub.dev"
source: hosted
version: "1.1.11+1"
version: "1.1.19"
vector_graphics_codec:
dependency: transitive
description:
name: vector_graphics_codec
sha256: c86987475f162fadff579e7320c7ddda04cd2fdeffbe1129227a85d9ac9e03da
sha256: "99fd9fbd34d9f9a32efd7b6a6aae14125d8237b10403b422a6a6dfeac2806146"
url: "https://pub.dev"
source: hosted
version: "1.1.11+1"
version: "1.1.13"
vector_graphics_compiler:
dependency: transitive
description:
name: vector_graphics_compiler
sha256: "12faff3f73b1741a36ca7e31b292ddeb629af819ca9efe9953b70bd63fc8cd81"
sha256: "557a315b7d2a6dbb0aaaff84d857967ce6bdc96a63dc6ee2a57ce5a6ee5d3331"
url: "https://pub.dev"
source: hosted
version: "1.1.11+1"
version: "1.1.17"
vector_math:
dependency: transitive
description:
Expand All @@ -315,18 +315,18 @@ packages:
dependency: transitive
description:
name: web
sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27"
sha256: "868d88a33d8a87b18ffc05f9f030ba328ffefba92d6c127917a2ba740f9cfe4a"
url: "https://pub.dev"
source: hosted
version: "0.5.1"
version: "1.1.1"
wtf_sliding_sheet:
dependency: transitive
description:
name: wtf_sliding_sheet
sha256: df68a79cb6fe3272b79ec995f9ec254d6ae33b53199f6213e40221b5e7bd5f2b
sha256: eb2f844a03fc64b9b904dc441bbb2283ee4dcf5244fe64bd91063bfbad70e89c
url: "https://pub.dev"
source: hosted
version: "1.1.3"
version: "1.1.5"
xml:
dependency: transitive
description:
Expand All @@ -337,4 +337,4 @@ packages:
version: "6.5.0"
sdks:
dart: ">=3.7.0-0 <4.0.0"
flutter: ">=3.18.0-18.0.pre.54"
flutter: ">=3.27.0"
19 changes: 13 additions & 6 deletions lib/src/presentation/di/injector.dart
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,25 @@ class _Injector {
_theme = theme;
_imageHeaders = imageHeaders;
_userId = userId;
_cacheDataSource = CacheDataSourceImpl();
_suggestionsDataSource = suggestionsDataSource;
_suggestionRepository = SuggestionRepositoryImpl(
_suggestionsDataSource,
_cacheDataSource,
);

if (!_isInitialized) {
_cacheDataSource = CacheDataSourceImpl();
_suggestionsDataSource = suggestionsDataSource;
_suggestionRepository = SuggestionRepositoryImpl(
_suggestionsDataSource,
_cacheDataSource,
);
_isInitialized = true;
}

_adminSettings = adminSettings;
_isAdmin = isAdmin;
_localization = locale.localizationOptions;
_navigatorKey = navigatorKey;
}

bool _isInitialized = false;

AdminSettings? _adminSettings;

AdminSettings? get adminSettings => _adminSettings;
Expand Down
14 changes: 7 additions & 7 deletions lib/src/presentation/pages/suggestion/suggestion_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import 'package:suggest_a_feature/src/presentation/utils/assets_strings.dart';
import 'package:suggest_a_feature/src/presentation/utils/date_utils.dart';
import 'package:suggest_a_feature/src/presentation/utils/dimensions.dart';
import 'package:suggest_a_feature/src/presentation/utils/image_utils.dart';
import 'package:suggest_a_feature/src/presentation/utils/platform_check.dart';
import 'package:suggest_a_feature/src/presentation/utils/typedefs.dart';
import 'package:wtf_sliding_sheet/wtf_sliding_sheet.dart';

Expand Down Expand Up @@ -107,11 +106,9 @@ class _SuggestionPageState extends State<SuggestionPage> {
),
SafeArea(
top: false,
bottom: SuggestionsPlatform.isIOS,
child: Container(
padding: EdgeInsets.only(
bottom: MediaQuery.of(context).padding.bottom +
Dimensions.marginSmall,
padding: const EdgeInsets.only(
bottom: Dimensions.marginSmall,
),
child: Row(
crossAxisAlignment: CrossAxisAlignment.end,
Expand Down Expand Up @@ -797,10 +794,13 @@ class _NewCommentButton extends StatelessWidget {
child: FilledButton(
style: context.theme.filledButtonTheme.style?.copyWith(
backgroundColor: WidgetStateProperty.resolveWith<Color>(
(states) => context.theme.colorScheme.secondaryContainer,
(states) =>
theme.secondaryButtonBackgroundColor ??
context.theme.colorScheme.secondaryContainer,
),
foregroundColor: WidgetStatePropertyAll(
context.theme.colorScheme.onSecondaryContainer,
theme.secondaryButtonForegroundColor ??
context.theme.colorScheme.onSecondaryContainer,
),
),
onPressed: onClick,
Expand Down
3 changes: 1 addition & 2 deletions lib/src/presentation/pages/suggestions/suggestions_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -389,8 +389,7 @@ class _BottomFab extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Positioned(
bottom: Dimensions.marginDefault +
MediaQuery.paddingOf(context).bottom,
bottom: Dimensions.marginDefault + MediaQuery.paddingOf(context).bottom,
right: Dimensions.marginDefault,
child: SuggestionsFab(
padding: const EdgeInsets.all(Dimensions.marginDefault),
Expand Down
11 changes: 11 additions & 0 deletions lib/src/presentation/pages/theme/suggestions_theme.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ class SuggestionsTheme {

final Color featureLabelColor;
final Color bugLabelColor;

final Color? backgroundColor;
final Color? secondaryButtonBackgroundColor;
final Color? secondaryButtonForegroundColor;

SuggestionsTheme({
required this.actionColor,
Expand All @@ -35,6 +38,8 @@ class SuggestionsTheme {
required this.fade,
required this.fabColor,
this.backgroundColor,
this.secondaryButtonBackgroundColor,
this.secondaryButtonForegroundColor,
});

factory SuggestionsTheme.initial() => SuggestionsTheme(
Expand Down Expand Up @@ -70,6 +75,8 @@ class SuggestionsTheme {
Color? fade,
Color? fabColor,
Color? backgroundColor,
Color? secondaryButtonBackgroundColor,
Color? secondaryButtonForegroundColor,
}) {
return SuggestionsTheme(
actionColor: actionColor ?? this.actionColor,
Expand All @@ -88,6 +95,10 @@ class SuggestionsTheme {
fade: fade ?? this.fade,
fabColor: fabColor ?? this.fabColor,
backgroundColor: backgroundColor ?? this.backgroundColor,
secondaryButtonBackgroundColor:
secondaryButtonBackgroundColor ?? this.secondaryButtonBackgroundColor,
secondaryButtonForegroundColor:
secondaryButtonForegroundColor ?? this.secondaryButtonForegroundColor,
);
}
}
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: suggest_a_feature
description: Ready-made Flutter package for collecting suggestions from users.
version: 0.5.1
version: 0.5.2
repository: https://github.com/flutterwtf/Suggest-a-Feature
homepage: https://pub.dev/packages/suggest_a_feature

Expand Down