Skip to content

๐ŸŒฑ ๋‹น์‹ ์˜ ์ˆ˜์—…์— ๋‚ ๊ฐœ๋ฅผ, DAKUA

Notifications You must be signed in to change notification settings

jjjooo-it/Flutter_DAKUA

ย 
ย 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

70 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๋‹น์‹ ์˜ ์ˆ˜์—…์— ๋‚ ๊ฐœ๋ฅผ, DAKUA

'๋‹ค์ฟ ์•„' ํ”„๋ก ํŠธ์—”๋“œ ๋ ˆํฌ์ง€ํ† ๋ฆฌ์ž…๋‹ˆ๋‹ค!

FE AI & BE
@jjjooo-it @ha-seungwon

๐Ÿ“ขํ”„๋กœ์ ํŠธ ์„ค๋ช…

'๋ชจ๋ฐ”์ผ ํ”Œ๋žซํผ' ์ˆ˜์—…์„ ๋“ค์œผ๋ฉฐ ์ง„ํ–‰ํ•œ ํ”„๋กœ์ ํŠธ์ž…๋‹ˆ๋‹ค. 'DAKUA'๋Š” ์œ ํ•™์ƒ์„ ์œ„ํ•œ AI ์ˆ˜์—… ์š”์•ฝ ์–ดํ”Œ์ž…๋‹ˆ๋‹ค. ๊ตญ๋‚ด ์™ธ๊ตญ์ธ ์œ ํ•™์ƒ์˜ ์ˆ˜๋Š” ์ฆ๊ฐ€ํ•˜๋Š” ์ถ”์„ธ์ด์ง€๋งŒ, ํ•œ๊ตญ์–ด๋กœ ์ง„ํ–‰๋˜๋Š” ์ˆ˜์—…์„ ์ดํ•ดํ•˜์ง€ ๋ชปํ•ด ์–ด๋ ค์›€์„ ๊ฒช๋Š” ์œ ํ•™์ƒ์ด ๋งŽ์Šต๋‹ˆ๋‹ค. DAKUA๋Š” ์ˆ˜์—… ๋…น์Œ ํŒŒ์ผ์„ ์—…๋กœ๋“œ ์‹œ ์—ฌ๋Ÿฌ ํ˜•ํƒœ์˜ ์š”์•ฝ๋ณธ์„ ์ œ๊ณตํ•จ์œผ๋กœ์จ ์œ ํ•™์ƒ๋“ค์˜ ์ˆ˜์—… ์ดํ•ด๋„๋ฅผ ๋†’์ด๊ณ  ํ•œ๊ตญ ์ƒํ™œ์— ์›ํ™œํ•˜๊ฒŒ ์ ์‘ํ•  ์ˆ˜ ์žˆ๋„๋ก ๋„์™€์ค„ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

  • ํ•ต์‹ฌ ๊ธฐ๋Šฅ
    • ์ˆ˜์—… ๋…น์Œ ํŒŒ์ผ ์—…๋กœ๋“œ ํ•˜๊ธฐ
    • ์›Œ๋“œ ํด๋ผ์šฐ๋“œ / ํ•œ ์ค„ ์š”์•ฝ / ์ „์ฒด ํ…์ŠคํŠธ ํ˜•ํƒœ๋กœ ์ •๋ฆฌํ•˜์—ฌ ์ œ๊ณตํ•˜๊ธฐ
    • ํด๋”๋ฅผ ์ƒ์„ฑํ•˜์—ฌ ์ง€๋‚œ ์š”์•ฝ ๊ธฐ๋ก์„ ์ €์žฅํ•˜๊ธฐ
    • ์ค‘๊ตญ์–ด ์–ธ์–ด ์„ค์ •ํ•˜๊ธฐ

๐ŸŽฅ์‹คํ–‰์˜์ƒ

โญ๏ธ์ฝ”๋“œ์„ค๋ช…

MVVM ๊ตฌ์กฐ๋กœ ์ฝ”๋“œ๋ฅผ ์ž‘์„ฑ

  • dataSource : ๋ฐ์ดํ„ฐ๋ฅผ ๊ฐ€์ ธ์˜ค๋Š” ์˜์—ญ
  • dbHelper : Sqlite ์‚ฌ์šฉ์„ ์œ„ํ•œ DB ์ œ์–ด
  • model : ๋ฐ์ดํ„ฐ ์„ค๊ณ„
  • view(front/history/home/setting/widget) : ์‚ฌ์šฉ์ž์—๊ฒŒ ๋ณด์—ฌ์ง€๋Š” ์˜์—ญ
  • viewModel : view์˜ ์ƒํƒœ ๊ด€๋ฆฌ



SQLite๋ฅผ ํ†ตํ•œ ํšŒ์›๊ฐ€์ž…/๋กœ๊ทธ์ธ/๋กœ๊ทธ์•„์›ƒ ๊ตฌํ˜„ SQLite


static Future _initDatabaseFactory() async {
    sqfliteFfiInit();
    databaseFactory = databaseFactoryFfiWeb;
  }

  static initDB() async {
    String path = await getDatabasesPath();
    return openDatabase(
      join(path, 'my_database.db'),
      onCreate: (db, version) {
        return db.execute(
          "CREATE TABLE users(id TEXT PRIMARY KEY, username TEXT, password TEXT, name TEXT, country TEXT, userID TEXT)",
        );
      },
      version: 1,
    );
  }



input ๊ฐ’ ์˜ˆ์™ธ์ฒ˜๋ฆฌ


inputFormatters: [
  FilteringTextInputFormatter.allow(RegExp(r'^[a-zA-Z]+$')),
],
  
 ...
  
bool isAllowed = RegExp(r'^[a-zA-Z]+$').hasMatch(value);

if (!isAllowed) {
    setState(() {
      switch (field) {
        case 'username':
          nameError = '์˜ฌ๋ฐ”๋ฅธ ์ž…๋ ฅ๊ฐ’์„ ๋„ฃ์–ด์ฃผ์„ธ์š”.';
          break;
        case 'id':
          idError = '์˜ฌ๋ฐ”๋ฅธ ์ž…๋ ฅ๊ฐ’์„ ๋„ฃ์–ด์ฃผ์„ธ์š”.';
          break;
        case 'password':
          passwordError = '์˜ฌ๋ฐ”๋ฅธ ์ž…๋ ฅ๊ฐ’์„ ๋„ฃ์–ด์ฃผ์„ธ์š”.';
          break;
      }
    });
}



ํ™”๋ฉด ์ „ํ™˜ ์• ๋‹ˆ๋ฉ”์ด์…˜


  Navigator.pushReplacement(
    context,
    PageRouteBuilder(
      transitionDuration: Duration(milliseconds: 1500),
      pageBuilder: (context, animation, secondaryAnimation) => MiddlePage(user: user),
      transitionsBuilder: (context, animation, secondaryAnimation, child) {
        var curve = Curves.easeInOut;

        //ํ™”๋ฉด ์ „ํ™˜ ์• ๋‹ˆ๋ฉ”์ด์…˜
        var fadeAnimation = Tween(begin: 0.0, end: 1.0).animate(CurvedAnimation(
          parent: animation,
          curve: Interval(0.0, 0.5, curve: curve), // 0๋ถ€ํ„ฐ 0.5๊นŒ์ง€๋Š” ํ๋ ค์ง
        ));

        return FadeTransition(
          opacity: fadeAnimation,
          child: child,
        );
      },
    ),
  );
}



10์ดˆ๋งˆ๋‹ค ๋„˜๊ฒจ์ง€๋Š” ๊ด‘๊ณ ๋ฐ”

  • carousel_slider ํŒจํ‚ค์ง€ ์ด์šฉ carousel_slider
  • ์—ฌ๋Ÿฌ ์˜ต์…˜์„ ์ง€์ •ํ•  ์ˆ˜ ์žˆ์Œ

options: CarouselOptions(
  height: 100, 
  viewportFraction: 1, 
  initialPage: 0,
  enableInfiniteScroll: true, //๋ฌดํ•œ ์Šคํฌ๋กค ํ™œ์„ฑํ™”
  autoPlay: true, //์ž๋™ ์žฌ์ƒ ํ™œ์„ฑํ™”
  autoPlayInterval:
  Duration(seconds: 10), //์ž๋™ ์žฌ์ƒ ๊ฐ„๊ฒฉ
  autoPlayAnimationDuration:
  Duration(milliseconds: 8000), //์ž๋™ ์žฌ์ƒ ์• ๋‹ˆ๋ฉ”์ด์…˜ ์‹œ๊ฐ„
  autoPlayCurve: Curves.fastOutSlowIn,
  scrollDirection: Axis.horizontal,
),



์•„์ฝ”๋””์–ธ ํ˜•์‹์œผ๋กœ ์š”์•ฝ ๋‚ด์šฉ ๋ณด๊ธฐ


Container(
  width: double.infinity,
  padding: EdgeInsets.symmetric(horizontal: 20.0, vertical: 10.0),
  child: ExpansionPanelList(
    expandedHeaderPadding: EdgeInsets.zero,
    expansionCallback: (int index, bool isExpanded) {
      setState(() {
        _isExpanded = !_isExpanded;
      });
    },
    children: [
      ExpansionPanel(
        headerBuilder: (BuildContext context, bool isExpanded) {
          return ListTile(
            title: Text(
             _isExpanded? aiViewModel.aiSummary?.full_text_data ?? 'no_full'.tr()
                  :   aiViewModel.aiSummary!.text_data ?? 'no_summary'.tr(),
              style: TextStyle(fontSize: 16.0),
              textAlign: TextAlign.center,
            ),
          );
        },
        body: _isExpanded?
        Container(
          padding: EdgeInsets.symmetric(horizontal: 20.0, vertical: 10.0),
          child: Text(
            "",
            style: TextStyle(fontSize: 0.0),
            textAlign: TextAlign.center,
          ),
        )
        : Container(),
        isExpanded: _isExpanded,
      ),
    ],
  ),
),



์–ธ์–ด ์„ค์ •(ํ•œ๊ตญ์–ด/์ค‘๊ตญ์–ด)


runApp(
  EasyLocalization(
    supportedLocales: [Locale('ko', 'KR'), Locale('zh', 'CN')],
    path: 'assets/translations',
    fallbackLocale: Locale('ko', 'KR'), // ๊ธฐ๋ณธ ์–ธ์–ด
    child: const MyApp(),
  ),
);



๋กœ๋”ฉ ๋ฐ”

  • flutter_spinkit ํŒจํ‚ค์ง€ ์ด์šฉ flutter_spinkit

SpinKitWave(
  itemBuilder: (context, index) {
    return const DecoratedBox(
      decoration: BoxDecoration(color: Colors.green),
    );
  },
),

About

๐ŸŒฑ ๋‹น์‹ ์˜ ์ˆ˜์—…์— ๋‚ ๊ฐœ๋ฅผ, DAKUA

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 63.5%
  • Dart 23.9%
  • C++ 5.7%
  • CMake 4.8%
  • Ruby 0.7%
  • Swift 0.5%
  • Other 0.9%