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
@override | |
void initState() { | |
super.initState(); | |
downloadWhenNecessary(); | |
} | |
downloadWhenNecessary({Function action}) { | |
_downloadImage().then((bytes) async { | |
if(!mounted) return; |
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
@override | |
void initState() { | |
super.initState(); | |
downloadWhenNecessary(); | |
} | |
downloadWhenNecessary({Function action}) { | |
_downloadImage().then((bytes) async { | |
if(!mounted) return; |
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
Execution failed for task ':mylibrary:javadocRelease'. | |
> Javadoc generation failed. Generated Javadoc options file |
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
allprojects { | |
tasks.withType(Javadoc) { | |
options.addStringOption('Xdoclint:none', '-quiet') | |
options.addStringOption('encoding', 'UTF-8') | |
} | |
} |
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
function doGet(request) { | |
//var spreadsheetId = '14UvTqbN3jxOnXj59HilYllfjetV6eGv6WevQsw---axx'; | |
//var rangeName = 'A2:D'; | |
var spreadsheetId = request.parameter.id; | |
var rangeName = request.parameter.range; | |
var values = Sheets.Spreadsheets.Values.get(spreadsheetId, rangeName).values; | |
if (!values) { | |
Logger.log('No data found.'); | |
} else { |
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
class NetworkClient { | |
Future<List<VocabData>> getVocabs(VocabConfiguration vocabConfig) async { | |
final url = "https://script.google.com/macros/s/script_id_xxxxxxxxxx/exec"; | |
final response = await Dio().get( | |
url, | |
queryParameters: { | |
"id": vocabConfig.sheetId, | |
"range": vocabConfig.rangeName | |
} |
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
Widget buildVocabList() => | |
FutureBuilder<List<VocabData>>( | |
future: getVocabDataList(), | |
builder: (BuildContext context, AsyncSnapshot snapshot) { | |
if (snapshot.connectionState != ConnectionState.done) { | |
return Container(); | |
} | |
final vocabList = snapshot.data; | |
return (isListViewMode) ? buildListView(vocabList) : buildPageView(vocabList); | |
}, |
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
class GrammarManager { | |
static const DB_NAME = "grammar.db"; | |
Database _grammarDb; | |
var _path; | |
Future<bool> isDBExisting() async { | |
final _databasesPath = await getDatabasesPath(); | |
if (!Directory(_databasesPath).existsSync()) { | |
Directory(_databasesPath).createSync(); |
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
class GrammarItem { | |
String id; | |
String name; | |
String category; | |
String description; | |
String structure; | |
GrammarLevel level; | |
GrammarFrequency frequency; | |
GrammarItem.fromMap(Map<String, dynamic> map) { |
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
Future<List<GrammarItem>> getGrammarItemList({String categoryName = "", GrammarLevel grammarLevel = GrammarLevel.ALL}) async { | |
await initDB(); | |
var query = """ | |
select grammar.grammar_id, grammar.grammar_name, grammar.grammar_category, grammar.grammar_level, grammar_desc.desc_en, grammar_structure.structure_en | |
from grammar | |
inner join grammar_desc on grammar.grammar_id = grammar_desc.grammar_id | |
inner join grammar_structure on grammar.grammar_id = grammar_structure.grammar_id | |
"""; |