wishfly 0.1.1
wishfly: ^0.1.1 copied to clipboard
Wishfly allows you to know what functions should your app have. All in your app.
Wishfly #
Put your users to driver's seat. Wishfly allows you to know what functions should your app have. #
[]
Features #
- User can create wish with title and description.
- In Admin you can change status of each wish (all new wishes must be approved before showing in list for users).
Getting started #
🤘 It takes less than 180 seconds to integrate Wishfly into your app.
-
Go to the Wishfly Admin and create account.
Click on plus button to create a new project and enter your app's name. -
Add dependency to your
pubspec.yamlfile
$ flutter pub add wishfly: ^0.1.1
or
dependencies:
flutter:
sdk: flutter
...
wishfly: ^0.1.1
Don't forget to flutter pub get.
- Import package in your dart file
import 'package:wishfly/wishfly.dart';
- You can place Widget in you widget tree. It could be a screen, modal or whatever you want. You can see example below.
import 'package:wishfly/wishfly.dart';
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Wishfly(
apiKey: "your-api-key-here", // your API key
projectId: 0, // your project ID
);
}
}
Additional information #
Localization #
Default language is English.
For supporting other languages, you can add corresponding keys to your own localization file and pass it to Wishfly widget. You can see localization keys here.
To get localization done, add WishflyLocalizationDelegate to your MaterialApp widget.
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Wishfly Demo',
supportedLocales: const [Locale('en')],
localizationsDelegates: const [
GlobalMaterialLocalizations.delegate,
GlobalWidgetsLocalizations.delegate,
GlobalCupertinoLocalizations.delegate,
WishflyLocalizationsDelegate(), // Add this line
],
home: ...,
);
}
}
If you do not add keys to your localization file, you can pass a map with keys to Wishfly widget in order to override default values.
child: Wishfly(
apiKey: ...
projectId: ...,
localizationOverrides: const {
"noWishes": "No wishes here, but you can be the first one!",
//... and more
},
),
Theme #
You can customize colors in UI. Here you can see what you can customize:
class WishflyThemeData {
final Color? voteIconColor;
final Color? addWishButtonColor;
final Color? titleTextColor;
final Color? tileBackgroundColor;
final Color? descriptionTextColor;
final Color? shadowColor;
final Color? voteCountTextColor;
final Color? primaryBackgroundColor;
final Color? itemTileColor;
final Color? progressBarBackgroundColor;
//...
}
In order to support dark or light mode, use WishflyThemeData.light() or WishflyThemeData.dark() factory method.
Example usage could be:
child: Wishfly(
apiKey: "your-api-key-here", // Paste your API key here
projectId: 0, // Paste your project ID here
theme: WishflyThemeData.light(
voteIconColor: Colors.black,
addWishButtonColor: Colors.black,
// more..
),
),