jld3103
2 years ago
15 changed files with 57 additions and 50 deletions
Before Width: | Height: | Size: 842 B After Width: | Height: | Size: 842 B |
@ -0,0 +1,12 @@ |
|||||||
|
import 'package:flutter_svg/flutter_svg.dart'; |
||||||
|
import 'package:neon/neon.dart'; |
||||||
|
|
||||||
|
Branding getNeonBranding() => Branding( |
||||||
|
name: 'Nextcloud Neon', |
||||||
|
legalese: 'Copyright © 2023, provokateurin\nUnder GPLv3 license', |
||||||
|
buildLogo: (final context, final size) => SvgPicture.asset( |
||||||
|
'assets/logo_neon.svg', |
||||||
|
width: size.width, |
||||||
|
height: size.height, |
||||||
|
), |
||||||
|
); |
@ -1,10 +1,12 @@ |
|||||||
import 'package:app/apps.dart'; |
import 'package:app/apps.dart'; |
||||||
|
import 'package:app/branding.dart'; |
||||||
import 'package:flutter/material.dart'; |
import 'package:flutter/material.dart'; |
||||||
import 'package:neon/neon.dart'; |
import 'package:neon/neon.dart'; |
||||||
|
|
||||||
Future main() async { |
Future main() async { |
||||||
await runNeon( |
await runNeon( |
||||||
getAppImplementations: getAppImplementations, |
|
||||||
binding: WidgetsFlutterBinding.ensureInitialized(), |
binding: WidgetsFlutterBinding.ensureInitialized(), |
||||||
|
getAppImplementations: getAppImplementations, |
||||||
|
branding: getNeonBranding(), |
||||||
); |
); |
||||||
} |
} |
||||||
|
@ -1,2 +0,0 @@ |
|||||||
Copyright © 2022, provokateurin |
|
||||||
Under GPLv3 license |
|
@ -0,0 +1,15 @@ |
|||||||
|
part of '../../neon.dart'; |
||||||
|
|
||||||
|
class Branding { |
||||||
|
Branding({ |
||||||
|
required this.name, |
||||||
|
required this.buildLogo, |
||||||
|
this.legalese, |
||||||
|
}); |
||||||
|
|
||||||
|
final String name; |
||||||
|
|
||||||
|
final Widget Function(BuildContext, Size) buildLogo; |
||||||
|
|
||||||
|
final String? legalese; |
||||||
|
} |
@ -1,28 +0,0 @@ |
|||||||
part of '../../neon.dart'; |
|
||||||
|
|
||||||
class NeonLogo extends StatelessWidget { |
|
||||||
const NeonLogo({ |
|
||||||
this.withoutText = false, |
|
||||||
super.key, |
|
||||||
}); |
|
||||||
|
|
||||||
final bool withoutText; |
|
||||||
|
|
||||||
@override |
|
||||||
Widget build(final BuildContext context) => Column( |
|
||||||
children: [ |
|
||||||
SvgPicture.asset( |
|
||||||
'assets/logo_neon.svg', |
|
||||||
package: 'neon', |
|
||||||
width: 100, |
|
||||||
height: 100, |
|
||||||
), |
|
||||||
if (!withoutText) ...[ |
|
||||||
Text( |
|
||||||
AppLocalizations.of(context).appName, |
|
||||||
style: Theme.of(context).textTheme.titleLarge, |
|
||||||
), |
|
||||||
], |
|
||||||
], |
|
||||||
); |
|
||||||
} |
|
Loading…
Reference in new issue