-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0119b27
commit e013d40
Showing
82 changed files
with
1,258 additions
and
1,569 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 11 additions & 3 deletions
14
lib/http/BanListChangeApi.dart → lib/api/BanListChangeApi.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import 'package:get/get.dart'; | ||
|
||
import 'http.dart'; | ||
|
||
class CharacterApi { | ||
|
||
factory CharacterApi() { | ||
return _instance; | ||
} | ||
CharacterApi._constructor(); | ||
|
||
static final _instance = CharacterApi._constructor(); | ||
|
||
Future<Response<List>> list() => http.get('/api/v1/characters?npc[\$ne]=true&limit=0&sort=-linkedArticle.date'); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import 'package:duel_links_meta/type/deck_type/DeckType.dart'; | ||
import 'package:get/get_connect/http/src/response/response.dart'; | ||
|
||
import 'package:duel_links_meta/api/http.dart'; | ||
|
||
class DeckTypeApi{ | ||
factory DeckTypeApi() { | ||
return _instance; | ||
} | ||
|
||
DeckTypeApi._constructor(); | ||
|
||
static final _instance = DeckTypeApi._constructor(); | ||
|
||
Future<Response<DeckType>> getDetailByName(String name) => | ||
http.get('/api/v1/deck-types?name=$name&limit=1&aggregate=aboveThresh', decoder: DeckType.fromJson); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import 'package:duel_links_meta/api/http.dart'; | ||
import 'package:duel_links_meta/type/skill/Skill.dart'; | ||
import 'package:get/get_connect/http/src/response/response.dart'; | ||
|
||
class SkillApi { | ||
factory SkillApi() { | ||
return _instance; | ||
} | ||
|
||
SkillApi._constructor(); | ||
|
||
static final _instance = SkillApi._constructor(); | ||
|
||
Future<Response<Skill>> getByName(String name) => http.get( | ||
'/api/v1/skills?name[\$in]=$name&limit=1', | ||
decoder: Skill.fromJson, | ||
); | ||
|
||
Future<Response<List<dynamic>>> getByCharacterId(String characterId) => | ||
http.get('/api/v1/skills?characters.character[\$or]=$characterId&archive[\$or]=true&rush[\$ne]=true&sort=name'); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import 'package:duel_links_meta/api/http.dart'; | ||
import 'package:get/get_connect/connect.dart'; | ||
|
||
class SkillStatsApi { | ||
factory SkillStatsApi() { | ||
return _instance; | ||
} | ||
|
||
SkillStatsApi._constructor(); | ||
|
||
static final _instance = SkillStatsApi._constructor(); | ||
|
||
Future<Response<List<dynamic>>> getByName(String name) => http.get('/api/v1/skills/stats?name=$name'); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import 'package:duel_links_meta/api/http.dart'; | ||
import 'package:duel_links_meta/type/deck_type/TierList_PowerRanking.dart'; | ||
import 'package:duel_links_meta/type/tier_list_top_tier/TierList_TopTier.dart'; | ||
import 'package:get/get_connect/http/src/response/response.dart'; | ||
|
||
class TierListApi { | ||
factory TierListApi() { | ||
return _instance; | ||
} | ||
|
||
TierListApi._constructor(); | ||
|
||
static final TierListApi _instance = TierListApi._constructor(); | ||
|
||
Future<Response<List<TierList_TopTier>>> getTopTiers() => http.get( | ||
r'/api/v1/deck-types?tier[$in]=0,1,2,3,4&limit=0&sort=name&fields=name,tier', | ||
decoder: (data) => (data as List<dynamic>).map(TierList_TopTier.fromJson).toList(), | ||
); | ||
|
||
Future<Response<List<TierList_PowerRanking>>> getPowerRankings() => http.get( | ||
r'/api/v1/deck-types?rush[$ne]=true&tournamentPower[$gte]=6&limit=0&sort=-tournamentPower&fields=name,tournamentPower,tournamentPowerTrend', | ||
decoder: (data) => (data as List<dynamic>).map(TierList_PowerRanking.fromJson).toList(), | ||
); | ||
|
||
Future<Response<List<TierList_PowerRanking>>> getRushRankings() => http.get( | ||
r'/api/v1/deck-types?rush=true&tournamentPower[$gte]=6&limit=0&sort=-tournamentPower&fields=name,tournamentPower,tournamentPowerTrend,rush', | ||
decoder: (data) => (data as List<dynamic>).map(TierList_PowerRanking.fromJson).toList(), | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import 'package:duel_links_meta/api/http.dart'; | ||
import 'package:duel_links_meta/type/top_deck/TopDeck.dart'; | ||
import 'package:get/get_connect/http/src/response/response.dart'; | ||
|
||
class TopDeckApi { | ||
factory TopDeckApi() { | ||
return _instance; | ||
} | ||
|
||
TopDeckApi._constructor(); | ||
|
||
static final _instance = TopDeckApi._constructor(); | ||
|
||
Future<Response<TopDeck>> getBreakdownSample(Map<String, String> params) => | ||
http.get('/api/v1/top-decks', query: params, decoder: TopDeck.fromJson); | ||
|
||
Future<Response<List<TopDeck>>> list(Map<String, dynamic> params) => http.get( | ||
'/api/v1/top-decks', | ||
query: params, | ||
decoder: (data) { | ||
return (data as List<dynamic>).map(TopDeck.fromJson).toList(); | ||
}, | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import 'package:get/get.dart'; | ||
|
||
import 'http.dart'; | ||
|
||
class WorldApi { | ||
factory WorldApi() { | ||
return _instance; | ||
} | ||
|
||
WorldApi._constructor(); | ||
|
||
static final _instance = WorldApi._constructor(); | ||
|
||
Future<Response<List<dynamic>>> list() => http.get('/api/v1/worlds'); | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import 'package:flutter/material.dart'; | ||
|
||
class ModalBottomSheetWrap extends StatelessWidget { | ||
const ModalBottomSheetWrap({required this.child, super.key}); | ||
|
||
final Widget child; | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Container( | ||
padding: const EdgeInsets.all(20), | ||
decoration: BoxDecoration( | ||
color: Theme.of(context).colorScheme.primary.withOpacity(0.1), | ||
borderRadius: const BorderRadius.only( | ||
topLeft: Radius.circular(34), | ||
topRight: Radius.circular(34), | ||
), | ||
), | ||
child: ClipRRect( | ||
borderRadius: const BorderRadius.all(Radius.circular(24)), | ||
child: ColoredBox( | ||
color: Theme.of(context).colorScheme.onPrimary, | ||
child: SingleChildScrollView( | ||
child: Column( | ||
children: [ | ||
child, | ||
], | ||
), | ||
), | ||
), | ||
), | ||
); | ||
} | ||
} |
Oops, something went wrong.