flutter_code_crafter 0.0.9 copy "flutter_code_crafter: ^0.0.9" to clipboard
flutter_code_crafter: ^0.0.9 copied to clipboard

discontinuedreplaced by: code_forge

Powerful code editor with AI code completion and LSP support

example/lib/main.dart

import 'package:flutter_code_crafter/code_crafter.dart';
import 'package:flutter/material.dart';
import 'package:flutter_highlight/themes/an-old-hope.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:highlight/languages/python.dart';

void main() {
  runApp(const MainApp());
}

class MainApp extends StatefulWidget {
  const MainApp({super.key});

  @override
  State<MainApp> createState() => _MainAppState();
}

class _MainAppState extends State<MainApp> {
  late final CodeCrafterController controller;
  late final Models model;

  @override
  void initState() {
    controller = CodeCrafterController();
    controller.language = python;
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: CodeCrafter(
          editorTheme: anOldHopeTheme,
          controller: controller,
          filePath: '/home/athul/Projects/lsp/example.py',
          textStyle: GoogleFonts.notoSansMono(fontSize: 15),
          aiCompletion: AiCompletion(
            enableCompletion: true,
            model: Gemini(apiKey: apiKey),
          ),
          lspConfig: LspSocketConfig(
            filePath: '/home/athul/Projects/lsp/example.py',
            workspacePath: "/home/athul/Projects/lsp",
            languageId: "python",
            serverUrl: "ws://localhost:5656",
          ),
        ),
      ),
    );
  }
}
8
likes
0
points
60
downloads

Publisher

unverified uploader

Weekly Downloads

Powerful code editor with AI code completion and LSP support

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, flutter_highlight, highlight, http, meta, web_socket_channel

More

Packages that depend on flutter_code_crafter