manager-app/lib/Components/flag_decoration.dart

36 lines
1.1 KiB
Dart

import 'package:flare_flutter/flare_actor.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
),
],
),
);
}
}