flutter

Flutter custom video player (play, pause, double speed, drag video progress)

[Flutter] custom video player Add [video_player] , dropdown_button2 in [pubspec.yaml] After the addition is complete, import it in the dart file that requires video import 'package:video_player/video_player.dart'; import 'package:dropdown_button2/dropdown_button2.dart'; specific code //Define a VideoPlayerController var _videoPlayerController; //Monitor whether the video is playing bool _isPlaying = false ; //Video address String videoUrl= "" ; //Show hidden function …

Flutter custom video player (play, pause, double speed, drag video progress) Read More »

Flutter – the most detailed (GridView) tutorial

Introduction to GridView: [Grid] list views can be created ; lists are constructed mainly through Count, extent, custom, and builder . There are properties such as padding, whether to reverse, sliding controller, etc. Four attribute usage scenarios, Count, extent, and custom are suitable for use when there are few sub-layouts. Pull-up refresh may be used. …

Flutter – the most detailed (GridView) tutorial Read More »

The use of the third-party plug-in Flutter chewie for the flutter video player

[The use of third-party plugins for flutter] player chewie chewie: ^0.9.8+1 portal video_player: ^0.10.1+6 Portal VideoPlayerController videoPlayerController; ChewieController chewieController; @override void initState () { // TODO: implement initState super .initState(); // player.setDataSource( // "https://www.xxx/test.mp4", // autoPlay: false); // Configure video address videoPlayerController = VideoPlayerController.network( 'https://xxx/test.mp4'); chewieController = ChewieController( videoPlayerController: videoPlayerController, aspectRatio: 3 / 2 , …

The use of the third-party plug-in Flutter chewie for the flutter video player Read More »

Stack of the basic layout of Flutter

Stack means cascading layout, the controls added first are at the bottom, and the controls added later are at the top. [The structure of] Stack is as follows: Stack({ Key? key, this.alignment = AlignmentDirectional.topStart, this.textDirection, this.fit = StackFit.loose, @Deprecated( 'Use clipBehavior instead. See the migration guide in flutter.dev/go/clip-behavior. ' 'This feature was deprecated after v1.22.0-12.0.pre.', …

Stack of the basic layout of Flutter Read More »

Row of the basic layout of Flutter

Row means horizontal layout, which can make its sub-controls arranged in a horizontal direction code show as below: class _TestState extends State<Test> { @override Widget build(BuildContext context) { return MaterialApp( home: Scaffold( body: Container( width: MediaQuery.of(context).size.width, height: MediaQuery.of(context).size.height, color: Colors.lightGreen, child: Row( children: [ Container( width: 100, height: 120, color: Colors.red, ), Container( width: 100, …

Row of the basic layout of Flutter Read More »

Flutter’s first program Hello World!

[Flutter] ‘s first program Hello World! foreword text 1. Download Flutter SDK 2. Environment variable configuration 3. Android Studio development environment Fourth, run the hello_world project 5. Create a Flutter project 6. Flutter engineering structure Seven, the core idea of ​​Flutter development end foreword I actually heard about Flutter before I learned Android, but at …

Flutter’s first program Hello World! Read More »

flutter video playback videoplayer with chewie

In [Flutter] , although video_player is officially provided to play video video_player official website link: video_player | Flutter Package But video_player only has a simple playback function, and the functions of [progress bar and] full screen can only be implemented by itself So Chewi appeared, which is a video playback library based on video_player, with …

flutter video playback videoplayer with chewie Read More »

flutter Text underline, strikethrough, dashed, bold, italic and other settings

First look at the renderings import 'package:flutter/material.dart'; void main(){ runApp( MaterialApp( title:'Text Demo', home:ContainerDemo() ), ); } class ContainerDemo extends StatelessWidget { @override Widget build(BuildContext context) { return Scaffold( appBar : AppBar( title : Text('Text Component'), ), body : Column( children : <Widget>[ Text( 'Red+Black Delete Line+25', style : TextStyle( color : const Color(0xffff0000), decoration …

flutter Text underline, strikethrough, dashed, bold, italic and other settings Read More »

Flutter simply implements waterfall stream pull-up loading, pull-down refresh

use components Pull up to load, pull down to refresh components flutter_easyrefresh: 2.2.1 Code directly below Widget build(BuildContext context) { return Scaffold( appBar: AppBar( title: Text('Waterfall'), centerTitle: true , ), body: EasyRefresh( onRefresh: () async { print("I am refreshing"); } , onLoad: () async { print("I am loading"); }, footer: ClassicalFooter( bgColor: Colors.white, // More …

Flutter simply implements waterfall stream pull-up loading, pull-down refresh Read More »