skip to Main Content

In below shown image one text is in middle and another one is in the bottom, how do I do it?

enter image description here

2

Answers


  1. Sharing example code to get this type of UI ,

    Scaffold(
          body: Container(
            width: double.infinity,
            color: Colors.green,
            child: Stack(
              children: [
                Center(
                  child: Container(child: Text("Middle Text")),
                ),
                Align(
                  alignment: Alignment.bottomCenter,
                  child: Container(
                      margin: EdgeInsets.only(bottom: 20),
                      child: Text("bottom text")),
                )
              ],
            ),
          ),
        );
    
    Login or Signup to reply.
  2. This is the simple implementation of your design, I prefer you to searching on youtube/any other learning platform for learning flutter

    import 'package:flutter/material.dart';
    
    void main() {
      runApp(const MyApp());
    }
    
    class MyApp extends StatelessWidget {
      const MyApp({super.key});
    
      @override
      Widget build(BuildContext context) {
        return MaterialApp(
            title: 'Flutter Demo',
            theme: ThemeData(
              primarySwatch: Colors.blue,
            ),
            home: Scaffold(
              backgroundColor: const Color.fromARGB(255, 41, 120, 88),
              body: SafeArea(
                child: Container(
                  child: Stack(
                    children: [
                      Center(
                        child: Container(
                            child: const Text(
                          "Gets you Job.",
                          style: TextStyle(
                              color: Colors.white,
                              fontWeight: FontWeight.w700,
                              fontSize: 36),
                        )),
                      ),
                      Align(
                        alignment: Alignment.bottomCenter,
                        child: Container(
                            child: const Text(
                          "c Intropros Technologies",
                          style: TextStyle(
                            color: Colors.white,
                          ),
                        )),
                      )
                    ],
                  ),
                ),
              ),
            ),
         );
       }
     }
    

    enter image description here

    there’s a lot of learning platform right now, udemy, youtube, and you can read flutter documentation too.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search