mirror of
https://github.com/ImranR98/Obtainium.git
synced 2025-10-24 19:33:45 +02:00
Changed source order, started adding strechy titlebars
This commit is contained in:
@@ -49,47 +49,64 @@ class _AppsPageState extends State<AppsPage> {
|
|||||||
},
|
},
|
||||||
icon: const Icon(Icons.update),
|
icon: const Icon(Icons.update),
|
||||||
label: const Text('Update All')),
|
label: const Text('Update All')),
|
||||||
body: Center(
|
body: RefreshIndicator(
|
||||||
child: appsProvider.loadingApps
|
onRefresh: () {
|
||||||
? const CircularProgressIndicator()
|
HapticFeedback.lightImpact();
|
||||||
: appsProvider.apps.isEmpty
|
return appsProvider.checkUpdates();
|
||||||
? Text(
|
},
|
||||||
'No Apps',
|
child: CustomScrollView(slivers: <Widget>[
|
||||||
style: Theme.of(context).textTheme.headlineMedium,
|
SliverAppBar(
|
||||||
)
|
pinned: true,
|
||||||
: RefreshIndicator(
|
snap: false,
|
||||||
onRefresh: () {
|
floating: false,
|
||||||
HapticFeedback.lightImpact();
|
expandedHeight: 100,
|
||||||
return appsProvider.checkUpdates();
|
backgroundColor: MaterialStateColor.resolveWith(
|
||||||
},
|
(states) => states.contains(MaterialState.scrolledUnder)
|
||||||
child: ListView(
|
? Theme.of(context).colorScheme.surface
|
||||||
children: sortedApps
|
: Theme.of(context).canvasColor,
|
||||||
.map(
|
),
|
||||||
(e) => ListTile(
|
flexibleSpace: const FlexibleSpaceBar(
|
||||||
title: Text('${e.app.author}/${e.app.name}'),
|
titlePadding: const EdgeInsets.only(bottom: 16.0, left: 20.0),
|
||||||
subtitle: Text(
|
title: Text(
|
||||||
e.app.installedVersion ?? 'Not Installed'),
|
'Apps',
|
||||||
trailing: e.downloadProgress != null
|
style: TextStyle(color: Colors.black),
|
||||||
? Text(
|
),
|
||||||
'Downloading - ${e.downloadProgress?.toInt()}%')
|
),
|
||||||
: (e.app.installedVersion != null &&
|
),
|
||||||
e.app.installedVersion !=
|
if (appsProvider.loadingApps || appsProvider.apps.isEmpty)
|
||||||
e.app.latestVersion
|
SliverToBoxAdapter(
|
||||||
? const Text('Update Available')
|
child: appsProvider.loadingApps
|
||||||
: null),
|
? const CircularProgressIndicator()
|
||||||
onTap: () {
|
: Text(
|
||||||
Navigator.push(
|
'No Apps',
|
||||||
context,
|
style: Theme.of(context).textTheme.headlineMedium,
|
||||||
MaterialPageRoute(
|
)),
|
||||||
builder: (context) =>
|
SliverList(
|
||||||
AppPage(appId: e.app.id)),
|
delegate: SliverChildBuilderDelegate(
|
||||||
);
|
(BuildContext context, int index) {
|
||||||
},
|
return ListTile(
|
||||||
),
|
title: Text(
|
||||||
)
|
'${sortedApps[index].app.author}/${sortedApps[index].app.name}'),
|
||||||
.toList(),
|
subtitle: Text(sortedApps[index].app.installedVersion ??
|
||||||
),
|
'Not Installed'),
|
||||||
),
|
trailing: sortedApps[index].downloadProgress != null
|
||||||
));
|
? Text(
|
||||||
|
'Downloading - ${sortedApps[index].downloadProgress?.toInt()}%')
|
||||||
|
: (sortedApps[index].app.installedVersion != null &&
|
||||||
|
sortedApps[index].app.installedVersion !=
|
||||||
|
sortedApps[index].app.latestVersion
|
||||||
|
? const Text('Update Available')
|
||||||
|
: null),
|
||||||
|
onTap: () {
|
||||||
|
Navigator.push(
|
||||||
|
context,
|
||||||
|
MaterialPageRoute(
|
||||||
|
builder: (context) =>
|
||||||
|
AppPage(appId: sortedApps[index].app.id)),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}, childCount: sortedApps.length))
|
||||||
|
])));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -399,9 +399,9 @@ class SourceProvider {
|
|||||||
GitHub(),
|
GitHub(),
|
||||||
GitLab(),
|
GitLab(),
|
||||||
FDroid(),
|
FDroid(),
|
||||||
|
IzzyOnDroid(),
|
||||||
Mullvad(),
|
Mullvad(),
|
||||||
Signal(),
|
Signal()
|
||||||
IzzyOnDroid()
|
|
||||||
];
|
];
|
||||||
|
|
||||||
List<MassAppSource> massSources = [GitHubStars()];
|
List<MassAppSource> massSources = [GitHubStars()];
|
||||||
|
|||||||
Reference in New Issue
Block a user