mobile_nebula/lib/components/SiteTitle.dart
Caleb Jasik 5afc1ef692
Add licenses page (#227)
* Add licenses page

* Use PlatformListTile

* Use platform-specific icons

* More style fixes

* Switch back to using SimplePage

* Make title widget const

* Remove unused imports
2025-01-24 13:37:28 -06:00

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,
))
])));
}
}