mirror of
https://github.com/DefinedNet/mobile_nebula.git
synced 2025-01-30 17:07:02 +00:00
5afc1ef692
* Add licenses page * Use PlatformListTile * Use platform-specific icons * More style fixes * Switch back to using SimplePage * Make title widget const * Remove unused imports
30 lines
914 B
Dart
30 lines
914 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flutter_svg/svg.dart';
|
|
|
|
import '../models/Site.dart';
|
|
|
|
class SiteTitle extends StatelessWidget {
|
|
const SiteTitle({Key? key, required this.site}) : super(key: key);
|
|
|
|
final Site site;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
final dnIcon =
|
|
Theme.of(context).brightness == Brightness.dark ? 'images/dn-logo-dark.svg' : 'images/dn-logo-light.svg';
|
|
|
|
return IntrinsicWidth(
|
|
child: Padding(
|
|
padding: EdgeInsets.symmetric(horizontal: 16),
|
|
child: Row(children: [
|
|
site.managed
|
|
? Padding(padding: EdgeInsets.only(right: 10), child: SvgPicture.asset(dnIcon, width: 12))
|
|
: Container(),
|
|
Expanded(
|
|
child: Text(
|
|
site.name,
|
|
overflow: TextOverflow.ellipsis,
|
|
))
|
|
])));
|
|
}
|
|
}
|