Textlerim neden sola yaslanmıyor
Textlerim neden sola yaslamıyor yardımıcı olabilir misinizunknown
dart
2 years ago
4.7 kB
16
Indexable
import 'package:flutter/material.dart'; class MyHomePage extends StatefulWidget { const MyHomePage({super.key}); @override State<MyHomePage> createState() => _MyHomePageState(); } class _MyHomePageState extends State<MyHomePage> { @override Widget build(BuildContext context) { return Scaffold( body: Container( decoration: const BoxDecoration( gradient: LinearGradient( begin: Alignment.topLeft, end: Alignment.bottomRight, colors: [ Color.fromARGB(255, 0, 127, 83), Color(0xff1E3932), ], ), ), child: Column( children: [ SizedBox( height: 55, ), SizedBox( width: MediaQuery.of(context).size.width, height: 120, child: ListView( scrollDirection: Axis.horizontal, padding: EdgeInsets.symmetric(horizontal: 30), children: [ sizedPicture("assets/images/1.png"), const SizedBox( width: 20, ), sizedPicture("assets/images/2.png"), const SizedBox( width: 20, ), sizedPicture("assets/images/3.png") ], ), ), SizedBox( height: 10, ), SizedBox( width: MediaQuery.of(context).size.width, height: 120, child: ListView( scrollDirection: Axis.horizontal, children: [ sizedPicture("assets/images/starbucks.jpg"), const SizedBox( width: 20, ), sizedPicture("assets/images/5.png"), const SizedBox( width: 20, ), sizedPicture("assets/images/6.png") ], ), ), SizedBox( height: 30, ), const Text( "Welcome, \nTo Starbucks", textAlign: TextAlign.left, style: TextStyle( fontWeight: FontWeight.w700, fontSize: 30, color: Colors.white), ), SizedBox( height: 20, ), const Text( "We are here to listen to you, Find what you \nare looking for now", style: TextStyle( fontSize: 15, color: Colors.white, fontWeight: FontWeight.w400), ), SizedBox( height: 20, ), Container( padding: EdgeInsets.all(14), margin: EdgeInsets.symmetric(horizontal: 20), child: Row(mainAxisAlignment: MainAxisAlignment.center,children: [Image.asset("assets/images/Logo.png"),SizedBox(width: 10,),Text( "Continue with Google", style: TextStyle( fontWeight: FontWeight.w600, color: Colors.black), ), ],), decoration: BoxDecoration( color: Colors.white, borderRadius: BorderRadius.circular(16)), ), SizedBox( height: 20, ), Container( padding: EdgeInsets.all(14), margin: EdgeInsets.symmetric(horizontal: 20), child: Center( child: Text( "Continue with phone", style: TextStyle( fontWeight: FontWeight.w600, color: Colors.white), ), ), decoration: BoxDecoration( color: Colors.grey, borderRadius: BorderRadius.circular(16)), ), SizedBox( height: 15, ), const Text( "By continuing, you agree to the Starbucks \nTerms & Conditions", textAlign: TextAlign.left, style: TextStyle( fontWeight: FontWeight.w400, fontSize: 15, color: Colors.white), ), ], ), ), ); } SizedBox sizedPicture(String pictureyol) => SizedBox( width: 140, height: 140, child: Image.asset(pictureyol), ); }
Editor is loading...