Categories
Mastering Development

Video player issue in flutter

This is my code, in which I am playing a video. Now I want to stop(pause) video whenever I am switching the page. Sometime the code is working fine but some time audio of video is coming but video page is not opening. I am beginner in flutter. I have tried to pause the video […]

Categories
Mastering Development

Resizing a rotated container in flutter

I have a following code: import ‘package:flutter/material.dart’; import ‘package:flutter/rendering.dart’; import ‘package:vector_math/vector_math.dart’ as vector; import ‘dart:math’ as math; void main() { debugPaintSizeEnabled = true; return runApp(MyApp()); } class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( home: Scaffold( backgroundColor: Colors.grey, body: SafeArea( child: TestComp(), ), ), ); } } class TestComp extends StatefulWidget […]

Categories
Mastering Development

TextField State Management in Flutter

I am trying to create a note app. I am using a Textfield with a prefixicon and my problem is that if the user types something in the textfield and afterwards picks a date, then the textfield input is getting cleared. Any suggestions ?? Thanks in advance ! Here is tthe full code… class AddTask […]

Categories
Mastering Development

How to use implement calendar in flutter

I’m new to flutter and struggling to follow the use of external packages. An example is implementing the calendar from https://flutterawesome.com/flutter-rounded-date-picker My code is shown below: import ‘package:flutter/material.dart’; import ‘package:flutter_localizations/flutter_localizations.dart’; import ‘package:flutter_rounded_date_picker/rounded_picker.dart’; void main() { runApp(MyApp()); } class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return new MaterialApp( localizationsDelegates: [ GlobalMaterialLocalizations.delegate, GlobalWidgetsLocalizations.delegate, ], […]

Categories
Mastering Development

How do i hide blank rows in PaginatedDataTable Widgets?

Blank Rows Whenever i set the rows per page value to a number that is greater than the remaining rows to display at the last page of my talble, the rest of the page is filled with blank rows… …………………………………………………… …………………………………………………… import ‘package:flutter/material.dart’; import ‘package:universal_html/html.dart’; class CustomPaginatedDataTable extends StatefulWidget { final String _headerTitle; final List<String> […]

Categories
Mastering Development

How could I combine draggables with a listview so that I still can controll the listview?

I have a list of cards and I want each card to be draggable. The list is scrolling horizontally. But the problem is when I fill the list with draggables I cannot scroll the list anymore. I want the place the draggable card somewhere outside the list. So a ReorderableListView is not what I am […]

Categories
Mastering Development

how set a background color or image in app?

I would like know how we can set a background color (gradient or not) or image when we have a big list of widget on app page. Because we need display all the widgets over the container which display the background no ? For example, we have mobile page with futurebuilder and a lot of […]

Categories
Mastering Development

How do I align my text and icon in Listview in Flutter?

I want to recreate a ListView as shown below. However when I’m trying to replicate it, my text is overflowing and the image isn’t getting aligned with the text. This is my code: Expanded( child: Padding( padding: const EdgeInsets.all(10.0), child: Card( color: Colors.red, child: ListView.builder( padding: EdgeInsets.all(10.0), itemCount: filteredUsers.length, itemBuilder: (BuildContext context, int index) { […]

Categories
Mastering Development

Row Column Layout – Text overflow and Spacer disappear

I created a layout (code below) but I am facing 2 issues with it. Issue 1: the text in bottomRightSection overflows outside the screen instead of going to the next line. I tried to put it in a wrap and container widgets, and I also tried to add the max lines attribute, but it still […]

Categories
Mastering Development

Custom card layout on flutter

I want to create a custom card layout or iPad and Tablets Here’s what I code so far Widget _buildListItem(BuildContext context) { return new Container( child: ListView( children: <Widget>[ Card( elevation: 2, child: ClipPath( child: Container( height: 70, decoration: BoxDecoration( border: Border( right: BorderSide(color: Colors.lightGreen, width: 30))), child: Container( height: 70, child: Container( alignment: Alignment(1.16, […]