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