flutter-layout

is there any method for creating 3D charts in flutter

南楼画角 提交于 2021-02-10 20:18:50
问题 I want to make a 3D pie chart in my app but I am finding difficult to find the solution that shows the percentage and name for the area of selected region in the graph. I am using AnimatedCircularChart and for that the package is: import 'package:flutter_circular_chart/flutter_circular_chart.dart'; > AnimatedCircularChart( key: _chartKey, size: _chartSize, initialChartData: _quarterlyProfitPieData[0], chartType: CircularChartType.Pie, I want the label over the selected region. 回答1: Please try

Flutter - Dynamically adding widget that needs to change state as well

不羁的心 提交于 2021-02-10 19:52:27
问题 What I want to achieve is explained below:- To show several widgets by clicking a button. The dynamically displayed widgets are basically FlatButtons with Icons as child. So when I click these buttons, I want the icon to change. However, on testing it - I found that their state doesn't change. Below is a sample code import 'package:flutter/material.dart'; class Test extends StatefulWidget { @override _TestState createState() => _TestState(); } class _TestState extends State<Test> { IconData

Flutter - How to change state from inside another widget

爷,独闯天下 提交于 2021-02-10 19:50:38
问题 I'm trying to implement both a Drawer and the Bottom Navigation Bar. The below class NavigationHomeScreen is my home screen and when the user clicks a menu item in the Drawer the Changeindex function updates the screenView I would like to know how I can similarly update the screenView but from the BottomNavigationBarApp using the onTabTapped method. class NavigationHomeScreen extends StatefulWidget { @override _NavigationHomeScreenState createState() => _NavigationHomeScreenState(); } class

Flutter - How to ensure the switch is on even after clicking on the back button?

自闭症网瘾萝莉.ら 提交于 2021-02-10 06:33:14
问题 I have a settings menu with 8 listTiles and If I turn on one of the switches, the issue is - when I click on the back button and click on the settings menu again, the switch is turned off ... what would I have to add to make sure the switch is on even if the back button is clicked? After this- what ever switch is turned on that's the color image I want to display in another class ..... that is why I need to ensure only one switch is on at one time, and that once the user clicks the back

scrollbar with drag effect in flutter

蓝咒 提交于 2021-02-10 04:01:29
问题 I need to implement scrolling bars in form. This is for web users by clicking on scrolling bar, they can navigate. Scrollbar class in flutter works for touch device, but not with mouse based input. I've tried using "draggable_scrollbar" library from pub.dev, however it only accepts ListView as child. My code: Widget build(BuildContext context) { return Scaffold( appBar: AppBar( title: Text('My form'), ), body: Padding( padding: const EdgeInsets.all(16.0), child: Scrollbar( child:

scrollbar with drag effect in flutter

允我心安 提交于 2021-02-10 04:01:27
问题 I need to implement scrolling bars in form. This is for web users by clicking on scrolling bar, they can navigate. Scrollbar class in flutter works for touch device, but not with mouse based input. I've tried using "draggable_scrollbar" library from pub.dev, however it only accepts ListView as child. My code: Widget build(BuildContext context) { return Scaffold( appBar: AppBar( title: Text('My form'), ), body: Padding( padding: const EdgeInsets.all(16.0), child: Scrollbar( child:

scrollbar with drag effect in flutter

醉酒当歌 提交于 2021-02-10 04:00:29
问题 I need to implement scrolling bars in form. This is for web users by clicking on scrolling bar, they can navigate. Scrollbar class in flutter works for touch device, but not with mouse based input. I've tried using "draggable_scrollbar" library from pub.dev, however it only accepts ListView as child. My code: Widget build(BuildContext context) { return Scaffold( appBar: AppBar( title: Text('My form'), ), body: Padding( padding: const EdgeInsets.all(16.0), child: Scrollbar( child:

scrollbar with drag effect in flutter

与世无争的帅哥 提交于 2021-02-10 04:00:25
问题 I need to implement scrolling bars in form. This is for web users by clicking on scrolling bar, they can navigate. Scrollbar class in flutter works for touch device, but not with mouse based input. I've tried using "draggable_scrollbar" library from pub.dev, however it only accepts ListView as child. My code: Widget build(BuildContext context) { return Scaffold( appBar: AppBar( title: Text('My form'), ), body: Padding( padding: const EdgeInsets.all(16.0), child: Scrollbar( child:

How to make Stack layout scroll-able using SingleChildScrollView?

陌路散爱 提交于 2021-02-08 14:27:48
问题 I am trying to make stack layout scrollable using SingleChildScrollView but it's not scrolling. Is SingleChildScrollView should be used here? I think I have given enough description to make anyone understand my question. More text here to satisfy StackOverflow's requirement to ask a question. Sorry about this. Here's example code. @override Widget build(BuildContext context) { return Scaffold( body: SafeArea( child: Container( child: Center( child: LayoutBuilder( builder: (BuildContext

svg image as button in flutter

霸气de小男生 提交于 2021-02-08 13:54:15
问题 I created a play-button and saved it as a svg dokument. I have also created my home screen with a picture in the background and a floatingActionButton centered. (I used stack for this). import 'package:flutter/material.dart'; class MyBackgroundWidget extends StatelessWidget { @override Widget build(BuildContext context) { return new Stack( children: <Widget>[ new Container( child: new Image.asset('assets/Backgr.png'), width: double.infinity, height: double.infinity), Center( child: new