Flutter remove border expansion tile

You can wrap it in a Theme widget and do like this: Theme( data: ThemeData().copyWith(dividerColor: Colors.transparent), child: ExpansionTile( or if you’re using custom theme settings, you can use Theme.of(context) instead of ThemeData() like this: Theme( data: Theme.of(context).copyWith(dividerColor: Colors.transparent), child: ExpansionTile(

How to Make Two Floating Action Button in Flutter?

floatingActionButton property on Scaffold widget do not need to take FloatingActionButton widget necessarily. It can also take Column or Row widgets. Below, I’m sharing my Scaffold widget example with two floating action buttons on top of each other. return Scaffold( appBar: AppBar( title: Text(“”), ), body: SingleChildScrollView(/*…*/), floatingActionButton: Column( mainAxisAlignment: MainAxisAlignment.end, children: [ FloatingActionButton( child: … Read more

How to create colour box with fixed width and height in flutter?

Wrap any widget in a SizedBox to force it to match a fixed size. As for background colors or border, use DecoratedBox. You can then combine both, which leads to const SizedBox( width: 42.0, height: 42.0, child: const DecoratedBox( decoration: const BoxDecoration( color: Colors.red ), ), ), You may as well use Container which is … Read more

How to position a Widget at the bottom of a SingleChildScrollView?

The issue with SingleChildScrollView is that it shrikwrap it’s children. So to have auto size widget in between – we need to use MediaQuery to get the screen height & SizedBox to expand – SingleChildScrollView. Here Button will be at bottom of screen. working Code: double height = MediaQuery.of(context).size.height; SingleChildScrollView( child: SizedBox( height: height, child: … Read more

Bearer token request http flutter

token might not be set by the time it invokes http.get. Change it to String token = await Candidate().getToken(); final response = await http.get(url, headers: { ‘Content-Type’: ‘application/json’, ‘Accept’: ‘application/json’, ‘Authorization’: ‘Bearer $token’, }); print(‘Token : ${token}’); print(response); So that it is for sure set with right value.

How to horizontally center a Text in flutter?

try this import ‘package:flutter/material.dart’; void main() => runApp(MaterialApp(home: LoginPage())); class LoginPage extends StatelessWidget { @override Widget build(BuildContext context) { // TODO: implement build return Scaffold( body: Container( color: Colors.black, child: Row( mainAxisAlignment: MainAxisAlignment.center, children: <Widget>[ Column( mainAxisAlignment: MainAxisAlignment.center, children: <Widget>[_buildTitle()], ), ], )), ); } Widget _buildTitle() { return Center( child: Container( margin: EdgeInsets.only(top: 100), … Read more