Give me some Ideas!
Featherdactyl is intended to be an app for Pterodactyl Panel made in Flutter. More than that, its intended to add features to any panel without modifications, and for those features that need modifications; it will be done sanely.
- How should logging in to Feather work?
- url + api key? url + user + pass?
- save session as api key or cookies?
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
void main() { | |
C()()()()()()()()()()()()(); | |
} | |
class C { | |
const C([this.cnt=1]); | |
final int cnt; | |
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
void main() { | |
final isIdentical = identical(Singleton(), Singleton()); | |
print(isIdentical); | |
assert(isIdentical == true); | |
} | |
class Singleton { | |
static final Singleton _instance = Singleton._(); | |
const Singleton._(); |
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
void main() { | |
print('Wont pass null into a copy'); | |
final e1 = Example1(id: 1, name: 'hello 1'); | |
final e1Copy = e1.copyWith(name: null); | |
print('e1: ${e1.id}, ${e1.name}'); | |
print('e1Copy: ${e1Copy.id}, ${e1Copy.name}'); | |
print('\nSubclassing method'); | |
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'; | |
import 'package:hooks_riverpod/hooks_riverpod.dart'; | |
import 'package:riverpod_annotation/riverpod_annotation.dart'; | |
part 'mutation_provider.g.dart'; | |
class ExampleWidget extends ConsumerWidget { | |
const ExampleWidget({super.key}); |
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:meta/meta.dart'; | |
import 'package:riverpod_annotation/riverpod_annotation.dart'; | |
import 'package:stack_trace/stack_trace.dart'; | |
part 'mutation_provider.g.dart'; | |
// generic mutation | |
@riverpod | |
MutationState<void> mutation(MutationRef ref, Object mutationKey) { | |
return MutationState._initial(ref); |
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'; | |
// could use flutter_riverpod | |
import 'package:hooks_riverpod/hooks_riverpod.dart'; | |
import 'package:riverpod_annotation/riverpod_annotation.dart'; | |
import 'mutation_state.dart'; | |
part 'main.g.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
import 'dart:async'; | |
import 'package:flutter/foundation.dart'; | |
import 'package:flutter_riverpod/flutter_riverpod.dart'; | |
import 'package:web_socket_channel/web_socket_channel.dart'; | |
final _wsProvider = FutureProvider((ref) async { | |
final ws = YourWebsocket(Uri(/** ... */)); | |
ref.onDispose(ws.dispose); | |
await ws.connect(); |
OlderNewer