2022-08-12 20:07:16 +02:00
|
|
|
import 'package:flutter/material.dart';
|
2022-09-12 18:30:44 +02:00
|
|
|
import 'package:google_fonts/google_fonts.dart';
|
2024-02-12 00:22:25 +01:00
|
|
|
import 'package:revanced_manager/gen/strings.g.dart';
|
2022-08-12 20:07:16 +02:00
|
|
|
import 'package:revanced_manager/ui/views/contributors/contributors_viewmodel.dart';
|
2022-08-21 12:47:44 +02:00
|
|
|
import 'package:revanced_manager/ui/widgets/contributorsView/contributors_card.dart';
|
2022-09-12 18:30:44 +02:00
|
|
|
import 'package:revanced_manager/ui/widgets/shared/custom_sliver_app_bar.dart';
|
2022-08-12 20:07:16 +02:00
|
|
|
import 'package:stacked/stacked.dart';
|
|
|
|
|
|
|
|
class ContributorsView extends StatelessWidget {
|
2023-11-11 13:07:32 +01:00
|
|
|
const ContributorsView({super.key});
|
2022-08-12 20:07:16 +02:00
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return ViewModelBuilder<ContributorsViewModel>.reactive(
|
|
|
|
viewModelBuilder: () => ContributorsViewModel(),
|
2023-01-30 13:35:06 +01:00
|
|
|
onViewModelReady: (model) => model.getContributors(),
|
2022-08-12 20:07:16 +02:00
|
|
|
builder: (context, model, child) => Scaffold(
|
2022-09-12 18:30:44 +02:00
|
|
|
body: CustomScrollView(
|
|
|
|
slivers: <Widget>[
|
|
|
|
CustomSliverAppBar(
|
2024-02-12 00:22:25 +01:00
|
|
|
title: Text(
|
|
|
|
t.contributorsView.widgetTitle,
|
|
|
|
style: GoogleFonts.inter(
|
|
|
|
color: Theme.of(context).textTheme.titleLarge!.color,
|
2022-08-12 20:07:16 +02:00
|
|
|
),
|
2022-09-12 18:30:44 +02:00
|
|
|
),
|
|
|
|
),
|
|
|
|
SliverPadding(
|
|
|
|
padding: const EdgeInsets.all(20.0),
|
|
|
|
sliver: SliverList(
|
|
|
|
delegate: SliverChildListDelegate.fixed(
|
|
|
|
<Widget>[
|
|
|
|
ContributorsCard(
|
2024-02-12 00:22:25 +01:00
|
|
|
title: t.contributorsView.patcherContributors,
|
2022-09-12 18:30:44 +02:00
|
|
|
contributors: model.patcherContributors,
|
|
|
|
),
|
|
|
|
const SizedBox(height: 20),
|
|
|
|
ContributorsCard(
|
2024-02-12 00:22:25 +01:00
|
|
|
title: t.contributorsView.patchesContributors,
|
2022-09-12 18:30:44 +02:00
|
|
|
contributors: model.patchesContributors,
|
|
|
|
),
|
|
|
|
const SizedBox(height: 20),
|
|
|
|
ContributorsCard(
|
2024-02-12 00:22:25 +01:00
|
|
|
title: t.contributorsView.integrationsContributors,
|
2022-09-12 18:30:44 +02:00
|
|
|
contributors: model.integrationsContributors,
|
|
|
|
),
|
|
|
|
const SizedBox(height: 20),
|
|
|
|
ContributorsCard(
|
2024-02-12 00:22:25 +01:00
|
|
|
title: t.contributorsView.cliContributors,
|
2022-09-12 18:30:44 +02:00
|
|
|
contributors: model.cliContributors,
|
|
|
|
),
|
|
|
|
const SizedBox(height: 20),
|
|
|
|
ContributorsCard(
|
2024-02-12 00:22:25 +01:00
|
|
|
title: t.contributorsView.managerContributors,
|
2022-09-12 18:30:44 +02:00
|
|
|
contributors: model.managerContributors,
|
|
|
|
),
|
2023-08-10 14:25:07 +02:00
|
|
|
SizedBox(height: MediaQuery.viewPaddingOf(context).bottom),
|
2022-09-12 18:30:44 +02:00
|
|
|
],
|
2022-08-12 20:07:16 +02:00
|
|
|
),
|
2022-09-12 18:30:44 +02:00
|
|
|
),
|
2022-08-12 20:07:16 +02:00
|
|
|
),
|
2022-09-12 18:30:44 +02:00
|
|
|
],
|
2022-08-12 20:07:16 +02:00
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|