Categories
Development

Flutter SingleChildScrollView widget is pushing the whole container to the top and adding a chunk of white background

When I add the SingleChildScrollView widget, the whole container just goes up and there’s a box of white background at the bottom as shown in the screenshot. I tried removing the whole padding including the bottom and that didn’t change anything. I’m not really sure what to do. Any help would be appreciated. Screenshot of […]

Categories
Development

Cannot press buttons in my Flutter app until I press the Debug button in Dart DevTools while debugging

I’m writing a Flutter app and recently (I’m using the web-enabled version of flutter) I have to press the Debug button in the DartDev tool at the start of each debugging session to enable a button to work.For example, I press F5 on my keyboard to start the debugging session using the Mac iPhone Simulator […]

Categories
Development

Listview to pull up button/widget

I have simple listview example here with bottomNavigationBar, I need to when listview reach end(bootom scroll) new button to show up. Should i put button inside listview somehow or there is other way? here is complete example so Test button to show up on end of scrolling not all the time.. import ‘package:flutter/material.dart’; import ‘listview_column.dart’; […]

Categories
Development

Flutter Camera startImageStream returning images of null

I’m trying to create a realtime poseNet demo app with the help of Flutter and its Camera package. Displaying the camera preview works very well, but when I try to access the image stream via controller.startImageStream the program crashes. I’ve succeded in tracking the source of that bug down, and it seems to me that […]

Categories
Development

how to add clipper to navigation drawer in flutter

I have created a navigation drawer.But I don’t know how to add clipper using custom_clippers package I want to add clipper image in the header section of my drawer. here is the code Widget _createHeader() { return DrawerHeader( // margin: EdgeInsets.zero, // padding: EdgeInsets.zero, child:ClipPath( clipper: SideCutClipper(), child: Container( height: 600, width: 500 , color: […]

Categories
Development

Scrollable table with fixed first row and fixed first column in FLUTTER

I am trying to create a table that fixes the first row to stay on the visible layout while scrolling vertically but scrolls horizontally normally and the some for first column. Notification and gesture detectors import ‘package:flutter/cupertino.dart’; import ‘package:flutter/material.dart’; import ‘package:flutter/widgets.dart’; class FixedColumn { String valueColumn; FixedColumn({this.valueColumn}); } List<FixedColumn> fixedColumn = [ FixedColumn(valueColumn: ‘Y1’), FixedColumn(valueColumn: […]

Categories
Development

FlatButton onPressed prints null

Whenever I used FlatButton onPressed Method for printing variable value it prints null and I don’t know why . when I set the variable to static value textField on changed work well but FlatButton print the static value Widget build(BuildContext context) { String newTaskTitle; return Material( child: Container( color: Color(0xff757575), child: Container( padding: EdgeInsets.all(20.0), decoration: […]

Categories
Development

Collapsing title bar flutter with animation

I am trying to recreate this in Flutter -> https://blog.uptech.team/how-to-build-resizing-image-in-navigation-bar-with-large-title-8ba2e8bcb840 I.e., An app bar that resizes and aligns the title when you drag (Just the title, I don’t want the Captain America shield). I have looked into Sliver App Bar as below: NestedScrollView( controller: _scrollController, physics: NeverScrollableScrollPhysics(), headerSliverBuilder: (BuildContext context, bool innerBoxIsScrolled) { return <Widget>[ […]

Categories
Development

Why does text inside TextSpan wrap when hardcoded but not when passed via an object

So as the title says, the text will wrap instead of splitting words when it is hardcoded…but when the same string is passed via an object, it doesn’t wrap…what am I missing? !(https://imgur.com/FuBnzDN) !(https://imgur.com/8CnY5fq) RichText( softWrap: true, text: TextSpan( text: “Synonyms:”, style: TextStyle( color: Colors.white ), children: <TextSpan>[ TextSpan( text: “\n${wordOfTheDay.synonyms}”, // text: ‘\nwall, rampart, […]

Categories
Ask

Stateful widget not updating, after being updated in setState, how to solve this?

I am new to Flutter. I am trying to build a Quiz App. Now, I am on the Quiz Screen, and then a quiz has multiple questions. I am showing the question title along with the answers, and when someone clicks on the answer, I am updating the QuestionView again with the new question data. […]