Search
 
SCRIPT & CODE EXAMPLE
 

DART

vertically Center a Text in Flutter

import 'package:flutter/material.dart';

void main() => runApp(MaterialApp(home: LoginPage()));

class LoginPage extends StatelessWidget {
  const LoginPage({Key? key}) : super(key: key);
  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return Scaffold(
      body: Container(
          color: Colors.white,
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: [_buildTitle()],
          )),
    );
  }
  Widget _buildTitle() {
    return Center(
      child: Container(
        margin: const EdgeInsets.only(top: 100),
        child: Column(
          children: const [
            Text(
              "something.xyz",
              style: TextStyle(
                color: Colors.black,
                fontWeight: FontWeight.bold,
                fontSize: 25,
              ),
              // textAlign: TextAlign.center,
            ),
          ],
        ),
      ),
    );
  }
}
Comment

PREVIOUS NEXT
Code Example
Dart :: Add Underline Text in Flutter 
Dart :: flutter flatbutton width 
Dart :: onbackpressed in flutter 
Dart :: flutter copy 
Dart :: what is interface in dart 
Dart :: dart contains method 
Dart :: dart map.foreach 
Dart :: get single element from list in dart 
Dart :: list dart 
Dart :: Array of colors in dart 
Dart :: UserScrollNotification in flutter 
Dart :: dart strip html 
Dart :: package:mp3 player/play pause button.dart 
Dart :: dart define value null 
Dart :: Example of shorthand (arrow syntax) function Dart 
Dart :: use a class variable in other class in flutter 
Dart :: flutter fittedbox max value 
Dart :: quebrar linha texto flutter 
Dart :: dart compiler 
Dart :: create array in flutter 
Dart :: flutter sliver app bar remove top padding 
Dart :: print items from list dart 
Dart :: flutter image size percentage 
Swift :: swift ui int to binary 
Swift :: get device height and width wift 
Swift :: remove checkmark when selecting the cell again swift 5 
Swift :: check when webview finish loading swift 
Swift :: ios rounded button 
Swift :: swift remove tableview cell 
Swift :: swift 5 only the day number from date 
ADD CONTENT
Topic
Content
Source link
Name
3+5 =