Skip to content

Commit

Permalink
Update pub.dev version fetcher
Browse files Browse the repository at this point in the history
  • Loading branch information
sunarya-thito committed Feb 24, 2025
1 parent fc73442 commit 9667551
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,11 @@ void main() async {
_docs = jsonDecode(await rootBundle.loadString('docs.json'));
print('Running app with flavor: $flavor');
Uri checkVersionUri =
Uri.parse('https://pub.dev/packages/shadcn_flutter.json');
Uri.parse('https://pub.dev/api/packages/shadcn_flutter');
var response = await get(checkVersionUri);
if (response.statusCode == 200) {
var packageInfo = jsonDecode(response.body) as Map<String, dynamic>;
_packageLatestVersion = packageInfo['versions'][0];
_packageLatestVersion = packageInfo['latest']['version'];
}
GoRouter.optionURLReflectsImperativeAPIs = true;
final prefs = await SharedPreferences.getInstance();
Expand Down

0 comments on commit 9667551

Please sign in to comment.