mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-17 07:14:28 +01:00
new: snippet fmt
This commit is contained in:
@@ -1,10 +1,13 @@
|
||||
import 'package:after_layout/after_layout.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_markdown/flutter_markdown.dart';
|
||||
import 'package:toolbox/core/extension/context/common.dart';
|
||||
import 'package:toolbox/core/extension/context/dialog.dart';
|
||||
import 'package:toolbox/core/extension/context/locale.dart';
|
||||
import 'package:toolbox/core/extension/context/snackbar.dart';
|
||||
import 'package:toolbox/core/extension/widget.dart';
|
||||
import 'package:toolbox/data/res/provider.dart';
|
||||
import 'package:toolbox/view/widget/cardx.dart';
|
||||
import 'package:toolbox/view/widget/input_field.dart';
|
||||
|
||||
import '../../../data/model/server/snippet.dart';
|
||||
@@ -147,10 +150,21 @@ class _SnippetEditPageState extends State<SnippetEditPage>
|
||||
label: l10n.snippet,
|
||||
icon: Icons.code,
|
||||
),
|
||||
_buildTip(),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildTip() {
|
||||
return CardX(
|
||||
child: MarkdownBody(data: '''
|
||||
📌 ${l10n.supportFmtArgs}
|
||||
|
||||
${Snippet.fmtArgs.keys.map((e) => '`$e`').join(', ')}
|
||||
''').padding(const EdgeInsets.all(13)),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
void afterFirstLayout(BuildContext context) {
|
||||
if (widget.snippet != null) {
|
||||
|
||||
Reference in New Issue
Block a user