Custom Functions | FlutterFlow University
ฝัง
- เผยแพร่เมื่อ 5 ส.ค. 2024
- In this video we explore how to build and bind custom functions in FlutterFlow.
Ready to try FlutterFlow for yourself? Start building your app today with a free trial 👉 www.flutterflow.com
Follow us on Twitter 👉 / flutterflow
--------------
FlutterFlow is a low-code builder for native apps, bringing design and development into one tool. With drag-and-drop functionality, you can build pixel-perfect UIs and easily connect your app to live data via Firebase or APIs. Plus, you can add advanced features like push notifications, payments, animations, and more. Whether you build your own custom widgets or write custom code, FlutterFlow makes it easy to bring your app ideas to life. - วิทยาศาสตร์และเทคโนโลยี
Top tier tutorial, let us know more about these possibilities.
thank you for this GREAT work you do!!! I love your patience in your videos
Wow! Low code combined with AI is awesome. Game changing.
Great Tutorial ❤ Bang on point, and great narration!! ❤❤
Hello genix can you help me in creating a fully functional custom widget please help me out I got stucked
Very useful.
I have problems with all "dart" imports. "Target of URI doesn't exist:" in each import string. What I need to do?
one question, when i use firestore methods like update or read a document with my custom functions, it won't allow me to edit the function type like
Future myFunction(), what should i do , other than inbuild actions, because that's not flexible to use my comfortablity
I have one scenario , where if i deactivate user through admin app..the user app should logoff.and not able to signun untill if they are activated again..what is the do's for tht?
Thank You for the great FlutterFlow University series!
One question: You do not check if the input in this case is nummeric or not? It is not necessary?
Great question! We add a helper toString() in a lot of places to save you that step.
Can anyone help me creating a fully functional custom widget in flutterflow
Why on Test Mode my page turn darker?
cant we use a dependency?
You can use the dependancies that are there but not other pub.dev packages. If you need those use Custom Actions.
At the last part of the video 6:30 my variables menu doesn't have widgets.
Add the text field and its parameters will be available
Is there any way to delete a function that i won't use anymore ?
I have already found it
Can you please make a video an updated video on revenue cat, still trying to understand the concept😢
No offense, the last person that made a video on this, on your channel, was as if he just work up from sleep and started recording 😭😭😭 no offense
Hi, my friend, could you please help me fix my Flutter custom action to get the video duration?
// Automatic FlutterFlow imports
import '/backend/backend.dart';
import '/flutter_flow/flutter_flow_theme.dart';
import '/flutter_flow/flutter_flow_util.dart';
import '/custom_code/actions/index.dart'; // Imports other custom actions
import '/flutter_flow/custom_functions.dart'; // Imports custom functions
import 'package:flutter/material.dart';
// Begin custom action code
// DO NOT REMOVE OR MODIFY THE CODE ABOVE!
import 'dart:io';
import 'package:flutter_ffmpeg/flutter_ffmpeg.dart';
Future videoInformation(String video) async {
// get the media duration after uploading it from library or storage and return string in milliseconds
// Import necessary packages
// Create a function to get the media duration
Future videoInformation(String video) async {
// Create an instance of FlutterFFmpeg
final FlutterFFmpeg _flutterFFmpeg = FlutterFFmpeg();
// Get the media information using FFmpeg
final int rc = await _flutterFFmpeg.execute("-i $video");
// Check if FFmpeg was able to get the media information
if (rc == 0) {
// Get the duration of the media
final String duration = _flutterFFmpeg.getLastCommandOutput();
// Extract the duration from the output
final RegExp regex = RegExp(r"Duration: (\d{2}):(\d{2}):(\d{2}).(\d{2})");
final Match match = regex.firstMatch(duration);
// Calculate the duration in milliseconds
final int hours = int.parse(match.group(1));
final int minutes = int.parse(match.group(2));
final int seconds = int.parse(match.group(3));
final int milliseconds = int.parse(match.group(4));
final int durationInMilliseconds = ((hours * 3600) + (minutes * 60) + seconds) * 1000 + milliseconds;
// Return the duration in milliseconds as a string
return durationInMilliseconds.toString();
} else {
// Return an error message if FFmpeg was not able to get the media information
return "Error getting media information";
}}
{
}
}