-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into master-web
- Loading branch information
Showing
11 changed files
with
114 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
name: Snapstore Build | ||
on: | ||
release: | ||
types: [created] | ||
push: | ||
branches: | ||
- master | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: snapcore/action-build@v1 |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
import 'package:flutter/cupertino.dart'; | ||
import 'package:lastanswer/common_imports.dart'; | ||
import 'package:wiredash/wiredash.dart'; | ||
|
||
class FeedbackProvider extends StatelessWidget { | ||
const FeedbackProvider({ | ||
required this.child, | ||
super.key, | ||
}); | ||
final Widget child; | ||
static void show(final BuildContext context) { | ||
Wiredash.of(context).show( | ||
inheritMaterialTheme: true, | ||
options: FeedbackProvider.feedbackOptions, | ||
); | ||
} | ||
|
||
@override | ||
Widget build(final BuildContext context) { | ||
if (!Envs.isFeedbackAvailable) return child; | ||
return Wiredash( | ||
projectId: Envs.wiredashProjectId, | ||
secret: Envs.wiredashProjectSecret, | ||
feedbackOptions: feedbackOptions, | ||
child: child, | ||
); | ||
} | ||
|
||
static const feedbackOptions = WiredashFeedbackOptions( | ||
labels: [ | ||
// Take the label ids from your project console | ||
// https://console.wiredash.io/ -> Settings -> Labels | ||
Label( | ||
id: 'label-mlxjl2sa6f', | ||
title: 'Bug', | ||
), | ||
Label( | ||
id: 'label-qu10qzqcf2', | ||
title: 'Feature request', | ||
), | ||
], | ||
); | ||
} | ||
|
||
class FeedbackButton extends StatelessWidget { | ||
const FeedbackButton({super.key}); | ||
|
||
@override | ||
Widget build(final BuildContext context) => Visibility( | ||
visible: Envs.isFeedbackAvailable, | ||
child: IconButton( | ||
onPressed: () => FeedbackProvider.show(context), | ||
icon: const Icon(CupertinoIcons.exclamationmark_bubble), | ||
), | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,12 @@ | ||
// ignore_for_file: do_not_use_environment | ||
|
||
class Envs { | ||
static const isarDbName = 'isar_4'; | ||
static const sembastWebDbName = 'sembast_web'; | ||
static const sembastWebDbVersion = 1; | ||
static bool get isFeedbackAvailable => wiredashProjectId.isNotEmpty; | ||
static const wiredashProjectId = | ||
String.fromEnvironment('WIREDASH_PROJECT_ID'); | ||
static const wiredashProjectSecret = | ||
String.fromEnvironment('WIREDASH_PROJECT_SECRET'); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters