skip to Main Content

How to change color of Container on basis of array data in flutter?

IOWebSocketChannel? ioChannel; List<CustomRunners>? oldData = []; List<CustomRunners>? newData = []; void getSocket(){ ioChannel = IOWebSocketChannel.connect( Uri.parse( 'wss://xxx.xyz/port=${widget.port}/?logged=true&source=0'), headers: { 'Origin': 'https://abc.io', }, ); ioChannel?.stream.listen((message) { final data = jsonDecode(message); if (data[0] != null) { final match = SocketModel.fromJson(data[0]); newData!.clear(); for…

VIEW QUESTION

I want to compress an image size to send it api params as an form data by dio in flutter by FlutterNativeImage package

But I'm facing this problem again and again "Unhandled Exception: MissingPluginException(No implementation found for method compressWithFileAndGetFile on channel flutter_image_compress)" Trying to compress the image by this: File? compressedFile = await FlutterNativeImage.compressImage( scannedImage!.path, quality: 20, percentage: 60); and receiving an error…

VIEW QUESTION

ListView.builder builds too many items – Flutter

I am trying to implement indefinite scrolling with ListView.build: import 'package:flutter/material.dart'; void main() => runApp(MyApp()); class MyApp extends StatefulWidget { @override State<MyApp> createState() => _MyAppState(); } class _MyAppState extends State<MyApp> { final entries = []; void addData(num ind) async {…

VIEW QUESTION
Back To Top
Search