Initial commit: Penyerahan final Source code Tugas Akhir
This commit is contained in:
57
lib/widgets/login_regist/header.dart
Normal file
57
lib/widgets/login_regist/header.dart
Normal file
@ -0,0 +1,57 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:initial_folder/size_config.dart';
|
||||
import 'package:initial_folder/theme.dart';
|
||||
|
||||
class Header extends StatelessWidget {
|
||||
const Header(
|
||||
{Key? key,
|
||||
this.text = '',
|
||||
this.text2 = '',
|
||||
required this.style,
|
||||
this.jarak = 20,
|
||||
this.title = true})
|
||||
: super(key: key);
|
||||
final String text;
|
||||
final String text2;
|
||||
final TextStyle style;
|
||||
final double jarak;
|
||||
final bool title;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final Brightness brightnessValue =
|
||||
MediaQuery.of(context).platformBrightness;
|
||||
final isDarkMode = Theme.of(context).brightness == Brightness.dark;
|
||||
return Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
title == true
|
||||
? Image.asset(
|
||||
isDarkMode
|
||||
? 'assets/images/VOCASIA logo.png'
|
||||
: 'assets/images/VOCASIA logo dark.png',
|
||||
width: getProportionateScreenWidth(150),
|
||||
height: getProportionateScreenHeight(50),
|
||||
)
|
||||
: Text(text2,
|
||||
textAlign: TextAlign.center,
|
||||
style: thirdTextStyle.copyWith(
|
||||
color: isDarkMode ? baruTextutih : baruTexthitam,
|
||||
fontWeight: bold,
|
||||
fontSize: getProportionateScreenWidth(20),
|
||||
letterSpacing: 0.23)),
|
||||
SizedBox(height: getProportionateScreenHeight(jarak)),
|
||||
// Padding(
|
||||
// padding:
|
||||
// EdgeInsets.symmetric(horizontal: getProportionateScreenWidth(16)),
|
||||
// child: Text(text,
|
||||
// maxLines: 2,
|
||||
// textAlign: TextAlign.justify,
|
||||
// style: thirdTextStyle.copyWith(
|
||||
// color: isDarkMode ? baruTexthitam : baruTextutih,
|
||||
// )),
|
||||
// ),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user