berkeresvan / flutter

1 stars 0 forks source link

Card #25

Open berkeresvan opened 6 months ago

berkeresvan commented 6 months ago

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( colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple), useMaterial3: true, ), home: const MyHomePage(title: 'Flutter Demo Home Page'), ); } }

class MyHomePage extends StatefulWidget { const MyHomePage({super.key, required this.title});

final String title;

@override State createState() => _MyHomePageState(); }

class _MyHomePageState extends State { @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( backgroundColor: Theme.of(context).colorScheme.inversePrimary, title: Text(widget.title), ), body: Center( child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ SizedBox( width: 300, child: Card( color: Colors.deepPurpleAccent, elevation: 10.0, shadowColor: Colors.deepPurpleAccent, shape: RoundedRectangleBorder( borderRadius: BorderRadius.all(Radius.circular(15)), side: BorderSide(width: 2, color: Colors.pinkAccent)), child: Center( child: Column( children: [ Padding( padding: const EdgeInsets.all(8.0), child: Text( "Toplam Puan", style: TextStyle( color: Colors.white, fontSize: 30.0, fontWeight: FontWeight.bold), ), ), Padding( padding: const EdgeInsets.all(8.0), child: Row( mainAxisAlignment: MainAxisAlignment.center, children: [ Icon( Icons.star, color: Colors.amber, ), Text("150", style: TextStyle( color: Colors.white, fontSize: 40.0, fontWeight: FontWeight.bold)), ], ), ) ], )), ), ) ], ), ), ); } }