mirror of
https://github.com/DefinedNet/mobile_nebula.git
synced 2025-01-18 19:27:05 +00:00
64d45f66c7
This updates flutter to 3.24.1, the latest stable version, and also updates our flutter dependencies to latest. It targets the latest android sdk, 34, which is required if we want to publish a new version to the Google Play store. I also needed to make a few adjustments to handle deprecations. The biggest change is that I needed to wrap the main widget in MaterialApp to avoid problems with AdaptiveSwitch in iOS.
36 lines
1.2 KiB
Dart
36 lines
1.2 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flutter_platform_widgets/flutter_platform_widgets.dart';
|
|
import 'package:mobile_nebula/components/SimplePage.dart';
|
|
import 'package:mobile_nebula/services/share.dart';
|
|
|
|
class RenderedConfigScreen extends StatelessWidget {
|
|
final String config;
|
|
final String name;
|
|
|
|
RenderedConfigScreen({
|
|
Key? key,
|
|
required this.config,
|
|
required this.name,
|
|
}) : super(key: key);
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return SimplePage(
|
|
title: Text('Rendered Site Config'),
|
|
scrollable: SimpleScrollable.both,
|
|
trailingActions: <Widget>[
|
|
Builder(builder: (BuildContext context) {
|
|
return PlatformIconButton(
|
|
padding: EdgeInsets.zero,
|
|
icon: Icon(context.platformIcons.share, size: 28.0),
|
|
onPressed: () => Share.share(context, title: '$name.yaml', text: config, filename: '$name.yaml'),
|
|
);
|
|
}),
|
|
],
|
|
child: Container(
|
|
padding: EdgeInsets.all(5),
|
|
constraints: BoxConstraints(minWidth: MediaQuery.of(context).size.width),
|
|
child: SelectableText(config, style: TextStyle(fontFamily: 'RobotoMono', fontSize: 14))),
|
|
);
|
|
}
|
|
}
|