Flutter

How to set size to FloatingActionButton

时光怂恿深爱的人放手 提交于 2021-02-07 11:16:07
问题 I'm trying to set a size to a FloatingActionButton in flutter, I wanna set width / height , I mean, make the button bigger, I was looking for a circular button, but the only one that I got was this one, so, I started to work with this, but I need it a little bigger. 回答1: Use a Container where you can specify width and height , then use a RawMaterialButton , like this: myFabButton = Container( width: 200.0, height: 200.0, child: new RawMaterialButton( shape: new CircleBorder(), elevation: 0.0,

How to set size to FloatingActionButton

浪尽此生 提交于 2021-02-07 11:16:05
问题 I'm trying to set a size to a FloatingActionButton in flutter, I wanna set width / height , I mean, make the button bigger, I was looking for a circular button, but the only one that I got was this one, so, I started to work with this, but I need it a little bigger. 回答1: Use a Container where you can specify width and height , then use a RawMaterialButton , like this: myFabButton = Container( width: 200.0, height: 200.0, child: new RawMaterialButton( shape: new CircleBorder(), elevation: 0.0,

How to set size to FloatingActionButton

馋奶兔 提交于 2021-02-07 11:15:02
问题 I'm trying to set a size to a FloatingActionButton in flutter, I wanna set width / height , I mean, make the button bigger, I was looking for a circular button, but the only one that I got was this one, so, I started to work with this, but I need it a little bigger. 回答1: Use a Container where you can specify width and height , then use a RawMaterialButton , like this: myFabButton = Container( width: 200.0, height: 200.0, child: new RawMaterialButton( shape: new CircleBorder(), elevation: 0.0,

How to set image from API to Carousel in Flutter

不羁的心 提交于 2021-02-07 10:56:21
问题 I want to use a Banner Slider in Flutter apps, so I found a library to make it, namely Carousel . This is a good library but I found a problem for this library, How to set image from API into Carousel? or have any library for support image from API (list), have dot indicator, autoplay like Carousel? 回答1: Use Carousel package -: carousel_slider: ^1.3.0 CarouselSlider( autoPlay: true, pauseAutoPlayOnTouch: Duration(seconds: 5), height: MediaQuery.of(context).size.height * 0.60, items: <Widget>[

How to set image from API to Carousel in Flutter

那年仲夏 提交于 2021-02-07 10:56:08
问题 I want to use a Banner Slider in Flutter apps, so I found a library to make it, namely Carousel . This is a good library but I found a problem for this library, How to set image from API into Carousel? or have any library for support image from API (list), have dot indicator, autoplay like Carousel? 回答1: Use Carousel package -: carousel_slider: ^1.3.0 CarouselSlider( autoPlay: true, pauseAutoPlayOnTouch: Duration(seconds: 5), height: MediaQuery.of(context).size.height * 0.60, items: <Widget>[

Flutter- Routing to a different .dart file

别说谁变了你拦得住时间么 提交于 2021-02-07 10:55:04
问题 I am trying to create a project where a user can click on a tab in the navigation drawer and it will take them to a page where they can play a quiz. I am having trouble having the user click on the tab and it redirecting them to another .dart file that I have that contains all the code necessary for the quiz. I am very new to Flutter so any information and advice helps. If you have any questions or need information from me please just ask. import 'package:flutter/material.dart'; void main() {

Flutter- Routing to a different .dart file

依然范特西╮ 提交于 2021-02-07 10:54:38
问题 I am trying to create a project where a user can click on a tab in the navigation drawer and it will take them to a page where they can play a quiz. I am having trouble having the user click on the tab and it redirecting them to another .dart file that I have that contains all the code necessary for the quiz. I am very new to Flutter so any information and advice helps. If you have any questions or need information from me please just ask. import 'package:flutter/material.dart'; void main() {

Flutter- Routing to a different .dart file

给你一囗甜甜゛ 提交于 2021-02-07 10:54:31
问题 I am trying to create a project where a user can click on a tab in the navigation drawer and it will take them to a page where they can play a quiz. I am having trouble having the user click on the tab and it redirecting them to another .dart file that I have that contains all the code necessary for the quiz. I am very new to Flutter so any information and advice helps. If you have any questions or need information from me please just ask. import 'package:flutter/material.dart'; void main() {

How to access Stateful widget variable inside State class outside the build method?

半城伤御伤魂 提交于 2021-02-07 10:52:43
问题 I am trying to access the 'updateNotesModel' variable declared in the code in the _UpdateNotesState. I found out that you can do it using the 'widget' keyword as shown in the Scaffold below. But the problem here is that I am trying to access the variable outside the build method in order to give the TextEditingController a default value. How can I achieve this? class UpdateNotes extends StatefulWidget { final NotesModel updateNotesModel; UpdateNotes({Key key, this.updateNotesModel}): super

Fetch location from android in background in flutter

允我心安 提交于 2021-02-07 10:50:09
问题 I am using below code to get the track the location of user. This works proper when my application in foreground. But when my application move to background it stop working and i can not get any location. import 'dart:async'; import 'package:permission_handler/permission_handler.dart'; import 'package:geolocator/geolocator.dart'; class FetchLocation { var geolocator = Geolocator(); var locationOptions = LocationOptions(accuracy: LocationAccuracy.high, distanceFilter: 10