skip to Main Content

Flutter – GestureDetector – onTap: widget.press(), – final Function press;- Navigator.of(context).push();

This is my first page (RecomendsPlants) and I want to move to another page called (DetailsScreen) RecomendsPlants: // ignore_for_file: prefer_const_constructors import 'package:flutter/material.dart'; import 'package:mr_plants_store/constants.dart'; import 'package:mr_plants_store/screens/details/details_screen.dart'; class RecomendsPlants extends StatefulWidget { const RecomendsPlants({super.key}); @override State createState() => _RecomendsPlantsState(); } class…

VIEW QUESTION

Flutter, how to create same path directory in Android and IOS

File('/data/user/0/com.abc/cache/full.jpg') .writeAsBytesSync(class_image.encodeJpg(data)); I found out that Android works with this path. But in ios, I found out that it doesn't work with the error below. [VERBOSE-2:dart_vm_initializer.cc(41)] Unhandled Exception: FileSystemException: Cannot open file, path = '/data/user/0/com.abc/cache/full.jpg' (OS Error: No such file…

VIEW QUESTION

Flutter 'setState' redraws the entire screen instead of just the widget

My code is as follows: SfSlider( minorTicksPerInterval: 0, inactiveColor: Colors.grey[300], tooltipShape: const SfPaddleTooltipShape(), activeColor: _pictureQuality<500? Colors.deepOrange : _pictureQuality>500 && _pictureQuality<800? Colors.green : Colors.deepOrange, edgeLabelPlacement: EdgeLabelPlacement.auto, showLabels: true, showTicks: true, enableTooltip: true, stepSize: 10, showDividers: true, interval: 10.0, shouldAlwaysShowTooltip: false, min:…

VIEW QUESTION

Error: No named parameter withthe name title: Text( in flutter

` import 'package:flutter/material.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart'; class BottomNavBarWidget extends StatefulWidget { @override _BottomNavBarWidgetState createState() => _BottomNavBarWidgetState(); } class _BottomNavBarWidgetState extends State<BottomNavBarWidget> { @override Widget build(BuildContext context) { int _selectedIndex = 0; void _onItemTapped(int index) { setState(() { _selectedIndex = index; //…

VIEW QUESTION
Back To Top
Search