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
import 'package:flutter/material.dart'; | |
void main() { | |
runApp(const MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
const MyApp({super.key}); | |
@override |
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
import 'package:flutter/material.dart'; | |
import 'package:flutter/cupertino.dart'; | |
import 'package:intl/intl.dart'; | |
const Color darkBlue = Color.fromARGB(255, 18, 32, 47); | |
void main() { | |
runApp(MyApp()); | |
} |
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
import 'package:flutter/material.dart'; | |
const Color darkBlue = Color.fromARGB(255, 18, 32, 47); | |
void main() { | |
runApp(MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
@override |
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
import 'package:json_annotation/json_annotation.dart'; | |
part 'gpt_usage.g.dart'; | |
@JsonSerializable(explicitToJson: true) | |
class GptUsage { | |
@JsonKey(name: 'prompt_tokens') | |
int promptTokens; |
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
import 'package:json_annotation/json_annotation.dart'; | |
part 'gpt_choice_message.g.dart'; | |
@JsonSerializable(explicitToJson: true) | |
class GptChoiceMessage{ | |
String role; | |
String content; |
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
import 'gpt_choice_message.dart'; | |
import 'package:json_annotation/json_annotation.dart'; | |
part 'gpt_choice.g.dart'; | |
@JsonSerializable(explicitToJson: true) | |
class GptChoice { | |
GptChoiceMessage message; | |
@JsonKey(name: 'finish_reason') |
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
import 'gpt_choice.dart'; | |
import 'gpt_usage.dart'; | |
import 'package:json_annotation/json_annotation.dart'; | |
part 'gpt_message.g.dart'; | |
@JsonSerializable(explicitToJson: true) | |
class GptMessage { | |
String id; |
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
import 'dart:math'; | |
import 'package:flutter/material.dart'; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
debugShowCheckedModeBanner: false, |
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
import 'dart:developer'; | |
import 'dart:io'; | |
import 'package:yaml/yaml.dart'; | |
import 'package:yaml_writer/yaml_writer.dart'; | |
/// Run by calling dart increment_version.dart major/minor/patch | |
void main(List<String> args) { | |
// Use the provided argument to determine the version type to increment, | |
// or default to minor if no argument is provided |
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
import 'dart:convert'; | |
import 'package:json_annotation/json_annotation.dart'; | |
class IntListConverter implements JsonConverter<List<int>?, String> { | |
const IntListConverter(); | |
@override | |
List<int>? fromJson(String? json) => List<int>.from(jsonDecode(json ?? '[]').map((e) => e.toInt())); |
NewerOlder