2022-09-17 20:35:45 +08:00
|
|
|
import 'package:flutter/widgets.dart';
|
2022-10-08 00:55:47 +08:00
|
|
|
import 'package:flutter_vector_icons/flutter_vector_icons.dart';
|
2020-05-14 10:58:12 +05:30
|
|
|
import 'package:git_touch/scaffolds/common.dart';
|
2022-09-17 20:35:45 +08:00
|
|
|
import 'package:git_touch/widgets/action_entry.dart';
|
2020-05-14 10:58:12 +05:30
|
|
|
import 'package:git_touch/widgets/blob_view.dart';
|
|
|
|
|
|
|
|
class GistObjectScreen extends StatelessWidget {
|
2022-09-22 00:28:21 +08:00
|
|
|
const GistObjectScreen(this.login, this.id, this.file,
|
|
|
|
{this.raw, this.content});
|
2020-05-14 10:58:12 +05:30
|
|
|
final String login;
|
|
|
|
final String id;
|
|
|
|
final String file;
|
2021-05-16 15:16:35 +08:00
|
|
|
final String? raw;
|
|
|
|
final String? content;
|
2020-05-14 10:58:12 +05:30
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return CommonScaffold(
|
2022-10-08 01:06:03 +08:00
|
|
|
title: Text(file),
|
2022-09-07 00:28:12 +08:00
|
|
|
action: const ActionEntry(
|
2021-02-14 22:17:22 +08:00
|
|
|
iconData: Ionicons.cog,
|
2020-05-14 10:58:12 +05:30
|
|
|
url: '/choose-code-theme',
|
|
|
|
),
|
|
|
|
body: SingleChildScrollView(
|
|
|
|
scrollDirection: Axis.vertical,
|
|
|
|
child: BlobView(
|
|
|
|
file,
|
|
|
|
text: content,
|
|
|
|
)));
|
|
|
|
}
|
|
|
|
}
|