mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-07-15 09:45:22 +00:00

changed the method of generating assets to be more declrative when it comes to names of the assets. it now include the file path name e.g (asset in the path "assets/images/home-images/home.png" will be generated as this "String assetsImagesHomeImageshome = "path" ". this will be very helpful in the future when we want to orgnize the assets dir.
23 lines
472 B
Dart
23 lines
472 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:syncrow_app/generated/assets.dart';
|
|
|
|
class SyncrowLogo extends StatelessWidget {
|
|
const SyncrowLogo({
|
|
super.key,
|
|
this.isDark = true,
|
|
this.width = 150,
|
|
});
|
|
|
|
final bool isDark;
|
|
|
|
final double width;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Image.asset(
|
|
isDark ? Assets.assetsImagesBlackLogo : Assets.assetsImagesWhiteLogo,
|
|
scale: 1,
|
|
width: width);
|
|
}
|
|
}
|