35 lines
1.0 KiB
Dart
35 lines
1.0 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:manager_app/constants.dart';
|
|
|
|
class FlagDecoration extends StatelessWidget {
|
|
final String language;
|
|
FlagDecoration({Key? key, required this.language}) : super(key: key);
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
Size size = MediaQuery.of(context).size;
|
|
return Container(
|
|
width: 35,
|
|
height: 35,
|
|
decoration: BoxDecoration(
|
|
color: kBackgroundColor,
|
|
shape: BoxShape.circle,
|
|
//border: Border.all(width: 1.5, color: kSecondGrey),
|
|
image: DecorationImage(
|
|
fit: BoxFit.contain,
|
|
image: AssetImage("assets/images/"+language.toLowerCase()+".png")/*Svg(
|
|
"assets/images/"+language.toLowerCase()+".svg",
|
|
)*/, //AssetImage("assets/images/"+language+".png"),
|
|
),
|
|
boxShadow: const [
|
|
BoxShadow(
|
|
color: kBackgroundColor,
|
|
spreadRadius: 0.5,
|
|
blurRadius: 5,
|
|
offset: Offset(0, 1.5), // changes position of shadow
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
} |