10 Flutter Suggestions — Part 9/10
The penultimate part of this great series is now here, and today we'll take a look at the different packages as we did at the beginning of the series. We'll look at how to use a game engine to create our own games, but also to edit videos or prompt the user to install a new version of the application.
Enough said, let's get started!
Happy reading!
original
https://tomicriedel.medium.com/10-flutter-tips-part-9-10-313284d5fb37
Upgrader
https://pub.dev/packages/upgrader
Upgrader is a super package that alerts the user that updates to the application are available.
It's a bit cumbersome to create, but definitely something even a beginner with some Flutter knowledge can do. This scheme has several advantages. Once it's possible to display alerts in MaterialDesign as well as Cupertionostyle, you can also set different languages.
In App review
https://pub.dev/packages/in_app_review
While we're talking about small popups, we might as well move on. App reviews are very important for apps because they reflect what users think about the app and what you can improve as an app developer.
That's why there is a great plugin called in app review. With this package, users can give a rating at a specific location in the app and this rating is also published to the App \& Google Play Store without leaving the app.
Flutter Funding Choices
http://pub.dev/packages/flutter_funding_choices
ok this is the last popup of the day, i promise :)
In Europe, it is mandatory to ask in the app if data is allowed to be collected to improve services etc. To that end, there are options for a basket of flutter funding. This is an unofficial Flutter implementation of Fund Choice, a Google service that allows requesting user consent to personalize ads in AdMob.
In app notification
https://pub.dev/packages/in_app_notification
Notifications like WhatsApp, Signal and co. are so handy, I've shown how this package works in another 10 Flutter tips post. If you want to have a small notification in your app that is independent of the OS, then you can use the package notification in the app. It's very easy to use and you can show these little cards, for example, if something goes down during the login process. Speaking of logging in, isn't there a good solution for using strong passwords for users?
InAppNotification.show(
child: NotificationBody(count: _count),
context: context,
onTap: () => print('Notification tapped!'),
);
Flutter Password Validator
https://pub.dev/packages/flutter_pw_validator
To answer the question in the last tip: yes, it does exist. Authenticator is a very good package to ensure that the user meets the requirements for a good password. It's also very easy to use, and be sure to check it out.
TextField(
controller: _passwordController,
),
FlutterPwValidator(
controller: _passwordController,
minLength: 6,
uppercaseCharCount: 2,
numericCharCount: 3,
specialCharCount: 1,
width: 400,
height: 150,
onSuccess: yourCallbackFunction,
)
Webview Flutter
https://pub.dev/packages/webview_flutter
View a website in an app without using a browser or something? Well, you can do this easily, using webview/flutter. Like all the packages shown here, it is very easy to use and requires only one line of code:
return WebView(initialUrl: 'https://tomicriedel.medium.com');
Yes, that's it, now your webview is working. Of course, if you're going to create a browser, you can link the whole thing to a variable:
String tomicRiedel = '<https://tomicriedel.medium.com>';
return WebView(initialUrl: tomicRiedel);
Flag
Flags can be used in many different regions. For example, if you want the user to choose his country of origin, or you want to use a flag to make the country code more descriptive. Package flags give you all the world flags to use in your app:
Flag.fromCode(FlagsCode.COUNTRY_CODE, height: HEIGHT, width: WIDTH),
//OR
Flag.fromString(COUNTRY_CODE, height: HEIGHT, width: WIDTH),
Lan scanner
https://pub.dev/packages/lan_scanner
Everyone knows this popup in the app asking if the app is allowed to discover network devices in the local network. Does your application need this too? Then the package lan \_scanner is exactly what you need. Probably not in one line of code this time, but I'll show you how:
final port = 80;
final subnet = "192.168.0";
final timeout = Duration(seconds: 5);
final scanner = LanScanner();
final stream = scanner.preciseScan(
subnet,
timeout: timeout,
progressCallback: (ProgressModel progress) {
print('${progress.percent * 100}% 192.168.0.${progress.currIP}');
},
);
stream.listen((DeviceModel device) {
if (device.exists) {
print("Found device on ${device.ip}:${device.port}");
}
});
https://pub.dev/packages/network_info_plus
But probably because you don't know what your subnet is. Then you should still use the network_info_plus package and then call the ipToSubnet() function:
var wifiIP = await (NetworkInfo().getWifiIP())
var subnet = ipToSubnet(wifiIP);
Video trimmer
https://pub.dev/packages/video_trimmer
Everyone knows. When you want to edit video in the app. If you want to use this feature in your application, you should use video trimmer. It can trim the video, then watch this, also save in file. Another really cool feature of this package is that it even supports . Gif file.
Since it requires some permissions to load videos etc, I won't explain how to set it up here, but the package's README is very detailed and easy to understand.
Flame
https://pub.dev/packages/flame
As promised at the beginning, I'll show you a Flutter game engine. This is called flame. This engine is still in beta, but it is being developed continuously and has been built by many people. Robert Brunhage made a very simple game in the video, but it's just a simple example, I'm sure you can use it to make a real hit game ;)
Thanks for reading and have a nice day!
© Cat Brother
- WeChat ducafecat
- blog
- previous article
- github
- station b
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。