This file contains hidden or 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
| #!/bin/bash | |
| #================================================================================ | |
| #================================================================================ | |
| # This is a script to automate the setup of Google Cloud service account and credentials, required for integrating your Google Play app with RevenueCat. | |
| # Visit https://console.cloud.google.com/, choose the project you want to use, and then click on the Cloud Shell icon in the top right corner. | |
| # In the Cloud Console shell instance, create a new file called `credentials.sh` and paste the code below into it. |
This file contains hidden or 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
| import axios from 'axios'; | |
| import * as fs from 'fs'; | |
| import * as path from 'path'; | |
| import { parseBuffer } from 'music-metadata'; | |
| import * as randomstring from 'randomstring'; | |
| import { createOpenAIInstance } from '../configs/open-ai'; | |
| import { storage } from '../configs/firebase'; | |
| export async function convertSpeechToTextFromUrl(value: string): Promise<string> { | |
| const openai = createOpenAIInstance(); |
This file contains hidden or 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
| extension on WidgetTester { | |
| Future<void> launchApp() async { | |
| await app.main(); | |
| await pumpAndSettle(); | |
| } | |
| Future<void> clearState() async { | |
| await SharedPreferences.getInstance().then((it) => it.clear()); | |
| } |
This file contains hidden or 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
| import 'dart:math'; | |
| import 'package:flutter/material.dart'; | |
| import 'package:flutter/rendering.dart'; | |
| void main() { | |
| runApp(MyApp()); | |
| } | |
| class MyApp extends StatelessWidget { | |
| @override |
This file contains hidden or 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
| import 'package:flutter/material.dart'; | |
| class MyApp extends StatelessWidget { | |
| const MyApp({Key? key}) : super(key: key); | |
| @override | |
| Widget build(BuildContext context) { | |
| return const MaterialApp( | |
| title: 'Showcasing Flutter', | |
| home: HomePage(), |
This file contains hidden or 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
| import 'package:flutter/material.dart'; | |
| import 'alert_dialog.dart'; | |
| Future<bool?> showAlertDialogs(BuildContext context, {required String title, required String content}) async { | |
| bool? response; | |
| await showDialog( | |
| context: context, | |
| builder: (context) => MyAlertDialog( | |
| title: title, | |
| content: content, |
This file contains hidden or 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
| import 'package:flutter/material.dart'; | |
| import 'package:showcasing_flutter/components/show_dialog.dart'; | |
| class HomePage extends StatefulWidget { | |
| const HomePage({Key? key}) : super(key: key); | |
| @override | |
| State<HomePage> createState() => _HomePageState(); | |
| } |
This file contains hidden or 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
| import 'package:flutter/material.dart'; | |
| class MyAlertDialog extends StatelessWidget { | |
| final String title; | |
| final String content; | |
| final String buttonText1; | |
| final String? buttonText2; | |
| final void Function(bool v) callback; | |
| const MyAlertDialog( |