FlutterGen / flutter_gen

The Flutter code generator for your assets, fonts, colors, … — Get rid of all String-based APIs.
https://pub.dev/packages/flutter_gen
MIT License
1.46k stars 146 forks source link

[BUG]: Why some json file doen't convert to LottieGenImage? #466

Closed flexboni closed 8 months ago

flexboni commented 8 months ago

Is there an existing issue for this?

Version

5.4.0

Command type

build_runner (Default)

What happened?

(My english is not good...im so sorry)

Some files doen't convert to LottieGenImage. Some files covert well but a few things not good. How can i check?? image

Relevant a pubspec.yaml.

name: mid_cave
description: mid_cave

publish_to: "none" # Remove this line if you wish to publish to pub.dev

version: 1.0.0+4

environment:
  sdk: ">=3.0.0 <4.0.0"

dependencies:
  amazon_cognito_identity_dart_2: ^3.6.0
  animated_text_kit: ^4.2.2
  bottom_sheet: ^4.0.0
  cached_network_image: ^3.3.0
  carousel_slider: ^4.2.1
  chewie: ^1.4.0
  circular_countdown_timer: ^0.2.3
  coast: ^2.0.2
  collection: ^1.18.0
  colorful_safe_area: ^1.0.0
  cupertino_icons: ^1.0.2
  dartz: ^0.10.1
  dio: ^5.4.0
  dotted_border: ^2.1.0
  dotted_line: ^3.2.2
  drag_and_drop_lists: ^0.3.3
  entry: ^0.0.9
  expandable: ^5.0.1
  fl_chart:
    git: https://github.com/frybitsinc/fl_chart_gradient.git
  flex_color_picker: ^3.3.0
  flip_card: ^0.7.0
  flutter:
    sdk: flutter
  flutter_animate: ^4.2.0+1
  flutter_debouncer: ^2.0.0
  flutter_dotenv: ^5.1.0
  flutter_form_builder: ^9.1.1
  flutter_gen: ^5.4.0
  flutter_html: ^3.0.0-beta.2
  flutter_html_svg: ^3.0.0-beta.2
  flutter_math_fork: ^0.7.1
  flutter_riverpod: ^2.4.1
  flutter_screenutil: ^5.8.4
  flutter_slidable: ^3.0.0
  flutter_staggered_grid_view: ^0.6.2
  flutter_svg: ^2.0.7
  flutter_tex: ^4.0.5
  flutter_tts: ^3.8.2
  flutter_typeahead: ^4.8.0
  flutter_widget_from_html_core: null
  fluttertoast: ^8.2.2
  form_builder_validators: ^9.1.0
  freezed: ^2.4.6
  freezed_annotation: ^2.4.1
  fwfh_svg: ^0.8.0+3
  get: ^4.6.5
  go_router: ^13.0.0
  graphview: ^1.2.0
  html: ^0.15.4
  http: ^1.1.0
  intl: ^0.18.1
  jiffy: ^6.2.1
  json_annotation: ^4.8.1
  just_audio: ^0.9.35
  logger: ^2.0.2+1
  lottie: ^2.6.0
  math_expressions: ^2.4.0
  math_keyboard: ^0.2.1
  multi_split_view: ^2.4.0
  new_version_plus: ^0.0.11
  overlay_tooltip: ^0.2.3
  path_provider: ^2.1.0
  pencil_kit:
    git: https://github.com/frybitsinc/flutter-pencilkit.git
  perfect_volume_control: ^1.0.5
  pinput: ^2.2.31
  provider: ^6.0.5
  riverpod_annotation: ^2.3.3
  rxdart: ^0.27.7
  shared_preferences: ^2.2.0
  signature: ^5.3.0
  super_tooltip: ^2.0.5
  table_calendar: ^3.0.9
  timelines: ^0.1.0
  touchable: ^1.0.2
  typewritertext: ^1.9.0
  uuid: ^4.2.2
  vertical_scroll_tabbar_icon:
    git:
      url: https://github.com/frybitsinc/vertical_scroll_tabbar_icon.git
      ref: main
  video_player: ^2.6.0
  widget_and_text_animator: ^1.1.5
  zoom_tap_animation: ^1.1.0

dev_dependencies:
  build_runner: ^2.4.7
  flutter_gen_runner: ^5.3.2
  flutter_lints: ^2.0.0
  flutter_test:
    sdk: flutter
  go_router_builder: ^2.4.0
  json_serializable: ^6.7.1
  riverpod_generator: ^2.3.9
  riverpod_lint: ^2.3.7

flutter_gen:
  integrations:
    lottie: true
    flutter_svg: true

flutter:
  assets:
    - .env
    - assets/
    - assets/icons/
    - assets/icons/curriculum/
    - assets/icons/app_bar/
    - assets/icons/side_bar/
    - assets/icons/home/
    - assets/icons/grade/
    - assets/image_sequences/
    - assets/image_sequences/migo_loop/
    - assets/image_sequences/map/
    - assets/image_sequences/psrj_BG_loop_alpha_DeMain/
    - assets/images/
    - assets/images/vls/
    - assets/images/coachmark/
    - assets/images/curriculum/
    - assets/images/exam/
    - assets/images/home/
    - assets/images/home/big_units/
    - assets/images/home/bookmark/
    - assets/images/league/
    - assets/images/my_page/
    - assets/images/my_page/point_mall/
    - assets/images/point_mall/
    - assets/images/onboarding/
    - assets/images/onboarding/textbook/
    - assets/images/onboarding/workbook/
    - assets/images/practice/
    - assets/images/pre_test/
    - assets/images/pre_test/
    - assets/images/review/
    - assets/json/
    - assets/sounds/
    - assets/sounds/vls/
    - assets/sounds/scripts/
    - assets/sounds/scripts/hyonujeans/
    - assets/sounds/scripts/jang_daniels/
    - assets/videos/
    - assets/fonts/

  uses-material-design: true

  fonts:
    - family: NanumMyeongjo
      fonts:
        - asset: assets/fonts/NanumMyeongjo.ttf
    - family: KaTeX_Main
      fonts:
        - asset: assets/fonts/KaTeX_Main-Regular.ttf
    - family: KaTeX_Main_Italic
      fonts:
        - asset: assets/fonts/KaTeX_Main-Italic.ttf
    - family: LatinModern
      fonts:
        - asset: assets/fonts/latinmodern-math.otf
    - family: PretendardBold
      fonts:
        - asset: assets/fonts/Pretendard-Bold.ttf
    - family: PretendardLight
      fonts:
        - asset: assets/fonts/Pretendard-Light.ttf
    - family: PretendardMedium
      fonts:
        - asset: assets/fonts/Pretendard-Medium.ttf
    - family: Pretendard
      fonts:
        - asset: assets/fonts/Pretendard-Regular.ttf
    - family: MidCustomIcons
      fonts:
        - asset: assets/fonts/MidCustomIcons.ttf

Relevant log output

No response

Code of Conduct

bramp commented 8 months ago

Can you provide one of the JSON files that should be a Lottie but is not identified as such?

flexboni commented 8 months ago

Can you provide one of the JSON files that should be a Lottie but is not identified as such?

[test.json]

{"data":{"title":""}}

[curriculum_v1.json]

{
  "data": [
    {
      "code": "cha-001",
      "level": "middle",
      "title": "중학교",
      "grade": 1,
      "sectors": [
        {
          "code": "cha-001-001",
          "title": "수와 연산",
          "bigUnits": [
            {
              "code": "cha-001-001-001",
              "title": "수와 연산",
              "middleUnits": [
                {
                  "code": "cha-001-001-001-001",
                  "title": "소인수분해",
                  "smallUnits": [
                    {
                      "code": "cha-001-001-001-001-001",
                      "title": "소인수분해",
                      "subjects": [
                        {
                          "code": "cha-001-001-001-001-001-001",
                          "title": "소수와 합성수"
                        },
                        {
                          "code": "cha-001-001-001-001-001-002",
                          "title": "소인수분해"
                        },
                        {
                          "code": "cha-001-001-001-001-001-003",
                          "title": "소인수분해를 이용한 약수와 배수"
                        }
                      ]
                    },
                    {
                      "code": "cha-001-001-001-001-002",
                      "title": "최대공약수와 최소공배수",
                      "subjects": [
                        {
                          "code": "cha-001-001-001-001-002-001",
                          "title": "최대공약수와 최소공배수"
                        },
                        {
                          "code": "cha-001-001-001-001-002-002",
                          "title": "최대공약수와 최소공배수의 성질"
                        },
                        {
                          "code": "cha-001-001-001-001-002-003",
                          "title": "최대공약수와 최소공배수의 활용"
                        }
                      ]
                    }
                  ]
                },
                {
                  "code": "cha-001-001-001-002",
                  "title": "정수와 유리수",
                  "smallUnits": [
                    {
                      "code": "cha-001-001-001-002-001",
                      "title": "정수와 유리수",
                      "subjects": [
                        {
                          "code": "cha-001-001-001-002-001-001",
                          "title": "정수와 유리수"
                        }
                      ]
                    },
                    {
                      "code": "cha-001-001-001-002-002",
                      "title": "정수와 유리수의 대소 관계",
                      "subjects": [
                        {
                          "code": "cha-001-001-001-002-002-001",
                          "title": "수직선과 절대값"
                        },
                        {
                          "code": "cha-001-001-001-002-002-002",
                          "title": "수의 대소 관계의 표현"
                        }
                      ]
                    },
                    {
                      "code": "cha-001-001-001-002-003",
                      "title": "정수와 유리수의 덧셈, 뺄셈",
                      "subjects": [
                        {
                          "code": "cha-001-001-001-002-003-001",
                          "title": "유리수의 덧셈과 뺄셈"
                        }
                      ]
                    },
                    {
                      "code": "cha-001-001-001-002-004",
                      "title": "정수와 유리수의 곱셈, 나눗셈",
                      "subjects": [
                        {
                          "code": "cha-001-001-001-002-004-001",
                          "title": "유리수의 곱셈"
                        },
                        {
                          "code": "cha-001-001-001-002-004-002",
                          "title": "유리수의 나눗셈"
                        },
                        {
                          "code": "cha-001-001-001-002-004-003",
                          "title": "덧셈에 대한 곱셈의 분배법칙"
                        },
                        {
                          "code": "cha-001-001-001-002-004-004",
                          "title": "유리수의 덧셈, 뺄셈, 곱셈, 나눗셈의 혼합계산"
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        },
        {
          "code": "cha-001-002",
          "title": "문자와 식",
          "bigUnits": [
            {
              "code": "cha-001-002-001",
              "title": "문자와 식",
              "middleUnits": [
                {
                  "code": "cha-001-002-001-001",
                  "title": "문자의 사용과 식의 계산",
                  "smallUnits": [
                    {
                      "code": "cha-001-002-001-001-001",
                      "title": "문자의 사용",
                      "subjects": [
                        {
                          "code": "cha-001-002-001-001-001-001",
                          "title": "문자의 사용"
                        }
                      ]
                    },
                    {
                      "code": "cha-001-002-001-001-002",
                      "title": "식의 계산",
                      "subjects": [
                        {
                          "code": "cha-001-002-001-001-002-001",
                          "title": "다항식과 일차식"
                        },
                        {
                          "code": "cha-001-002-001-001-002-002",
                          "title": "일차식의 덧셈, 뺄셈, 곱셈, 나눗셈"
                        }
                      ]
                    }
                  ]
                }
              ]
            },
            {
              "code": "cha-001-002-002",
              "title": "일차방정식",
              "middleUnits": [
                {
                  "code": "cha-001-002-002-002",
                  "title": "일차방정식",
                  "smallUnits": [
                    {
                      "code": "cha-001-002-002-002-001",
                      "title": "방정식과 그 해",
                      "subjects": [
                        {
                          "code": "cha-001-002-002-002-001-001",
                          "title": "방정식과 항등식"
                        },
                        {
                          "code": "cha-001-002-002-002-001-002",
                          "title": "등식의 성질"
                        }
                      ]
                    },
                    {
                      "code": "cha-001-002-002-002-002",
                      "title": "일차방정식",
                      "subjects": [
                        {
                          "code": "cha-001-002-002-002-002-001",
                          "title": "일차방정식의 풀이"
                        },
                        {
                          "code": "cha-001-002-002-002-002-002",
                          "title": "일차방정식의 활용"
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        },
        {
          "code": "cha-001-003",
          "title": "함수",
          "bigUnits": [
            {
              "code": "cha-001-003-001",
              "title": "좌표평면과 그래프",
              "middleUnits": [
                {
                  "code": "cha-001-003-001-001",
                  "title": "좌표평면과 그래프",
                  "smallUnits": [
                    {
                      "code": "cha-001-003-001-001-001",
                      "title": "순서쌍과 좌표",
                      "subjects": [
                        {
                          "code": "cha-001-003-001-001-001-001",
                          "title": "좌표평면의 성질"
                        }
                      ]
                    },
                    {
                      "code": "cha-001-003-001-001-002",
                      "title": "그래프",
                      "subjects": [
                        {
                          "code": "cha-001-003-001-001-002-001",
                          "title": "그래프"
                        }
                      ]
                    },
                    {
                      "code": "cha-001-003-001-001-003",
                      "title": "정비례와 반비례",
                      "subjects": [
                        {
                          "code": "cha-001-003-001-001-003-001",
                          "title": "정비례"
                        },
                        {
                          "code": "cha-001-003-001-001-003-002",
                          "title": "반비례"
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        },
        {
          "code": "cha-001-004",
          "title": "기하",
          "bigUnits": [
            {
              "code": "cha-001-004-001",
              "title": "도형의 기초",
              "middleUnits": [
                {
                  "code": "cha-001-004-001-001",
                  "title": "기본 도형",
                  "smallUnits": [
                    {
                      "code": "cha-001-004-001-001-001",
                      "title": "점, 선, 면, 각",
                      "subjects": [
                        {
                          "code": "cha-001-004-001-001-001-001",
                          "title": "점, 선, 면"
                        },
                        { "code": "cha-001-004-001-001-001-002", "title": "각" }
                      ]
                    },
                    {
                      "code": "cha-001-004-001-001-002",
                      "title": "점, 직선, 평면의 위치 관계",
                      "subjects": [
                        {
                          "code": "cha-001-004-001-001-002-001",
                          "title": "점의 위치관계"
                        },
                        {
                          "code": "cha-001-004-001-001-002-002",
                          "title": "직선의 위치관계"
                        },
                        {
                          "code": "cha-001-004-001-001-002-003",
                          "title": "평면\u001f의 위치관계"
                        }
                      ]
                    },
                    {
                      "code": "cha-001-004-001-001-003",
                      "title": "동위각과 엇각",
                      "subjects": [
                        {
                          "code": "cha-001-004-001-001-003-001",
                          "title": "평행선과 각"
                        }
                      ]
                    }
                  ]
                },
                {
                  "code": "cha-001-004-001-002",
                  "title": "작도와 합동",
                  "smallUnits": [
                    {
                      "code": "cha-001-004-001-002-001",
                      "title": "삼각형의 작도",
                      "subjects": [
                        {
                          "code": "cha-001-004-001-002-001-001",
                          "title": "기본적인 작도"
                        },
                        {
                          "code": "cha-001-004-001-002-001-002",
                          "title": "삼각형의 작도"
                        },
                        {
                          "code": "cha-001-004-001-002-001-003",
                          "title": "삼각형이 정해질 조건"
                        }
                      ]
                    },
                    {
                      "code": "cha-001-004-001-002-002",
                      "title": "삼각형의 합동",
                      "subjects": [
                        {
                          "code": "cha-001-004-001-002-002-001",
                          "title": "삼각형의 합동"
                        }
                      ]
                    }
                  ]
                }
              ]
            },
            {
              "code": "cha-001-004-002",
              "title": "평면도형과 입체도형",
              "middleUnits": [
                {
                  "code": "cha-001-004-002-001",
                  "title": "평면도형의 성질",
                  "smallUnits": [
                    {
                      "code": "cha-001-004-002-001-001",
                      "title": "다각형의 성질",
                      "subjects": [
                        {
                          "code": "cha-001-004-002-001-001-001",
                          "title": "삼각형"
                        },
                        {
                          "code": "cha-001-004-002-001-001-002",
                          "title": "다각형"
                        },
                        {
                          "code": "cha-001-004-002-001-001-003",
                          "title": "정다각형"
                        }
                      ]
                    },
                    {
                      "code": "cha-001-004-002-001-002",
                      "title": "원과 부채꼴",
                      "subjects": [
                        {
                          "code": "cha-001-004-002-001-002-001",
                          "title": "원"
                        },
                        {
                          "code": "cha-001-004-002-001-002-002",
                          "title": "부채꼴"
                        }
                      ]
                    }
                  ]
                },
                {
                  "code": "cha-001-004-002-002",
                  "title": "입체도형의 성질",
                  "smallUnits": [
                    {
                      "code": "cha-001-004-002-002-001",
                      "title": "다면체의 성질",
                      "subjects": [
                        {
                          "code": "cha-001-004-002-002-001-001",
                          "title": "다면체"
                        },
                        {
                          "code": "cha-001-004-002-002-001-002",
                          "title": "다면체의 전개도"
                        }
                      ]
                    },
                    {
                      "code": "cha-001-004-002-002-002",
                      "title": "회전체의 성질",
                      "subjects": [
                        {
                          "code": "cha-001-004-002-002-002-001",
                          "title": "회전체"
                        },
                        {
                          "code": "cha-001-004-002-002-002-002",
                          "title": "회전체의 전개도"
                        }
                      ]
                    },
                    {
                      "code": "cha-001-004-002-002-003",
                      "title": "입체도형의 겉넓이와 부피",
                      "subjects": [
                        {
                          "code": "cha-001-004-002-002-003-001",
                          "title": "기둥"
                        },
                        {
                          "code": "cha-001-004-002-002-003-002",
                          "title": "뿔"
                        },
                        { "code": "cha-001-004-002-002-003-003", "title": "구" }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        },
        {
          "code": "cha-001-005",
          "title": "확률과 통계",
          "bigUnits": [
            {
              "code": "cha-001-005-001",
              "title": "통계(1)",
              "middleUnits": [
                {
                  "code": "cha-001-005-001-001",
                  "title": "자료의 정리와 해석",
                  "smallUnits": [
                    {
                      "code": "cha-001-005-001-001-001",
                      "title": "줄기와 잎 그림",
                      "subjects": [
                        {
                          "code": "cha-001-005-001-001-001-001",
                          "title": "줄기와 잎 그림"
                        }
                      ]
                    },
                    {
                      "code": "cha-001-005-001-001-002",
                      "title": "도수분포표",
                      "subjects": [
                        {
                          "code": "cha-001-005-001-001-002-001",
                          "title": "도수분포표"
                        }
                      ]
                    },
                    {
                      "code": "cha-001-005-001-001-003",
                      "title": "히스토그램과 도수분포다각형",
                      "subjects": [
                        {
                          "code": "cha-001-005-001-001-003-001",
                          "title": "히스토그램과 도수분포다각형"
                        }
                      ]
                    },
                    {
                      "code": "cha-001-005-001-001-004",
                      "title": "상대도수",
                      "subjects": [
                        {
                          "code": "cha-001-005-001-001-004-001",
                          "title": "상대도수"
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "code": "cha-002",
      "level": "middle",
      "title": "중학교",
      "grade": 2,
      "sectors": [
        {
          "code": "cha-002-001",
          "title": "수와 연산",
          "bigUnits": [
            {
              "code": "cha-002-001-001",
              "title": "수와 식의 계산",
              "middleUnits": [
                {
                  "code": "cha-002-001-001-001",
                  "title": "유리수와 순환소수",
                  "smallUnits": [
                    {
                      "code": "cha-002-001-001-001-001",
                      "title": "유리수와 순환소수",
                      "subjects": [
                        {
                          "code": "cha-002-001-001-001-001-001",
                          "title": "분수를 소수로 나타내기"
                        },
                        {
                          "code": "cha-002-001-001-001-001-002",
                          "title": "소수를 분수로 나타내기"
                        }
                      ]
                    },
                    {
                      "code": "cha-002-001-001-001-002",
                      "title": "지수법칙",
                      "subjects": [
                        {
                          "code": "cha-002-001-001-001-002-001",
                          "title": "지수법칙"
                        }
                      ]
                    },
                    {
                      "code": "cha-002-001-001-001-003",
                      "title": "다항식의 덧셈과 뺄셈",
                      "subjects": [
                        {
                          "code": "cha-002-001-001-001-003-001",
                          "title": "다항식의 덧셈과 뺄셈"
                        }
                      ]
                    },
                    {
                      "code": "cha-002-001-001-001-004",
                      "title": "다항식의 곱셈과 나눗셈(2)",
                      "subjects": [
                        {
                          "code": "cha-002-001-001-001-004-001",
                          "title": "단항식의 곱셈과 나눗셈"
                        },
                        {
                          "code": "cha-002-001-001-001-004-002",
                          "title": "다항식과 단항식의 곱셈과 나눗셈"
                        },
                        {
                          "code": "cha-002-001-001-001-004-003",
                          "title": "단항식의 곱셈과 나눗셈의 혼합 계산"
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        },
        {
          "code": "cha-002-002",
          "title": "문자와 식",
          "bigUnits": [
            {
              "code": "cha-002-002-001",
              "title": "부등식과 연립방정식",
              "middleUnits": [
                {
                  "code": "cha-002-002-001",
                  "title": "일차부등식",
                  "smallUnits": [
                    {
                      "code": "cha-002-002-001-001",
                      "title": "부등식과 그 해",
                      "subjects": [
                        { "code": "cha-002-002-001-001-001", "title": "부등식" }
                      ]
                    },
                    {
                      "code": "cha-002-002-001-002",
                      "title": "일차부등식",
                      "subjects": [
                        {
                          "code": "cha-002-002-001-002-001",
                          "title": "일차부등식의 풀이"
                        },
                        {
                          "code": "cha-002-002-001-002-002",
                          "title": "일차부등식의 활용"
                        }
                      ]
                    }
                  ]
                },
                {
                  "code": "cha-002-002-002",
                  "title": "연립일차방정식",
                  "smallUnits": [
                    {
                      "code": "cha-002-002-002-001",
                      "title": "미지수가 2개인 연립일차방정식",
                      "subjects": [
                        {
                          "code": "cha-002-002-002-001-001",
                          "title": "연립일차방정식의 풀이"
                        },
                        {
                          "code": "cha-002-002-002-001-002",
                          "title": "해가 특수한 연립방정식"
                        },
                        {
                          "code": "cha-002-002-002-001-003",
                          "title": "연립일차방정식의 활용"
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        },
        {
          "code": "cha-002-003",
          "title": "함수",
          "bigUnits": [
            {
              "code": "cha-002-003-001",
              "title": "함수",
              "middleUnits": [
                {
                  "code": "cha-002-003-001-001",
                  "title": "일차함수와 그래프",
                  "smallUnits": [
                    {
                      "code": "cha-002-003-001-001-001",
                      "title": "일차함수와 그 그래프",
                      "subjects": [
                        {
                          "code": "cha-002-003-001-001-001-001",
                          "title": "일차함수와 그 그래프"
                        }
                      ]
                    },
                    {
                      "code": "cha-002-003-001-001-002",
                      "title": "일차함수의 그래프의 성질과 활용",
                      "subjects": [
                        {
                          "code": "cha-002-003-001-001-002-001",
                          "title": "일차함수의 그래프의 평행, 일치"
                        },
                        {
                          "code": "cha-002-003-001-001-002-002",
                          "title": "다양한 일차함수 식 구하기\u001f"
                        }
                      ]
                    }
                  ]
                },
                {
                  "code": "cha-002-003-001-002",
                  "title": "일차함수와 일차방정식의 관계",
                  "smallUnits": [
                    {
                      "code": "cha-002-003-001-002-001",
                      "title": "일차함수와 일차방정식",
                      "subjects": [
                        {
                          "code": "cha-002-003-001-002-001-001",
                          "title": "일차방정식과 그래프"
                        }
                      ]
                    },
                    {
                      "code": "cha-002-003-001-002-002",
                      "title": "두 일차함수의 그래프와 연립일차방정식",
                      "subjects": [
                        {
                          "code": "cha-002-003-001-002-002-001",
                          "title": "두 일차함수의 그래프와 연립일차방정식"
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        },
        {
          "code": "cha-002-004",
          "title": "기하",
          "bigUnits": [
            {
              "code": "cha-002-004-001",
              "title": "도형의 성질",
              "middleUnits": [
                {
                  "code": "cha-002-004-001-001",
                  "title": "삼각형의 성질",
                  "smallUnits": [
                    {
                      "code": "cha-002-004-001-001-001",
                      "title": "이등변삼각형의 성질",
                      "subjects": [
                        {
                          "code": "cha-002-004-001-001-001-001",
                          "title": "이등변삼각형"
                        },
                        {
                          "code": "cha-002-004-001-001-001-002",
                          "title": "직각삼각형의 합동 조건"
                        },
                        {
                          "code": "cha-002-004-001-001-001-003",
                          "title": "각의 이등분선의 성질"
                        }
                      ]
                    },
                    {
                      "code": "cha-002-004-001-001-002",
                      "title": "삼각형의 외심과 내심",
                      "subjects": [
                        {
                          "code": "cha-002-004-001-001-002-001",
                          "title": "삼각형의 외심"
                        },
                        {
                          "code": "cha-002-004-001-001-002-002",
                          "title": "삼각형의 내심"
                        }
                      ]
                    }
                  ]
                },
                {
                  "code": "cha-002-004-001-002",
                  "title": "사각형의 성질",
                  "smallUnits": [
                    {
                      "code": "cha-002-004-001-002-001",
                      "title": "평행사변형",
                      "subjects": [
                        {
                          "code": "cha-002-004-001-002-001-001",
                          "title": "평행사변형의 성질"
                        },
                        {
                          "code": "cha-002-004-001-002-001-002",
                          "title": "평행사변형의 넓이"
                        }
                      ]
                    },
                    {
                      "code": "cha-002-004-001-002-002",
                      "title": "여러 가지 사각형",
                      "subjects": [
                        {
                          "code": "cha-002-004-001-002-002-001",
                          "title": "직사각형의 성질"
                        },
                        {
                          "code": "cha-002-004-001-002-002-002",
                          "title": "마름모의 성질"
                        },
                        {
                          "code": "cha-002-004-001-002-002-003",
                          "title": "정사각형의 성질"
                        },
                        {
                          "code": "cha-002-004-001-002-002-004",
                          "title": "등변사다리꼴의 성질"
                        },
                        {
                          "code": "cha-002-004-001-002-002-005",
                          "title": "여러 가지 사각형 사이의 관계"
                        }
                      ]
                    }
                  ]
                }
              ]
            },
            {
              "code": "cha-002-004-002",
              "title": "도형의 닮음과 피타고라스 정리",
              "middleUnits": [
                {
                  "code": "cha-002-004-002-001",
                  "title": "도형의 닮음",
                  "smallUnits": [
                    {
                      "code": "cha-002-004-002-001-001",
                      "title": "닮은 도형",
                      "subjects": [
                        {
                          "code": "cha-002-004-002-001-001-001",
                          "title": "닮음"
                        }
                      ]
                    },
                    {
                      "code": "cha-002-004-002-001-002",
                      "title": "삼각형의 닮음 조건",
                      "subjects": [
                        {
                          "code": "cha-002-004-002-001-002-001",
                          "title": "삼각형의 SSS닮음"
                        },
                        {
                          "code": "cha-002-004-002-001-002-002",
                          "title": "삼각형의 SAS닮음"
                        },
                        {
                          "code": "cha-002-004-002-001-002-003",
                          "title": "삼각형의 AA닮음"
                        },
                        {
                          "code": "cha-002-004-002-001-002-004",
                          "title": "직각삼각형의 닮음"
                        }
                      ]
                    },
                    {
                      "code": "cha-002-004-002-001-003",
                      "title": "평행선 사이의 선분의 길이의 비",
                      "subjects": [
                        {
                          "code": "cha-002-004-002-001-003-001",
                          "title": "평행선 사이의 선분의 길이의 비"
                        },
                        {
                          "code": "cha-002-004-002-001-003-002",
                          "title": "삼각형의 각의 이등분선"
                        },
                        {
                          "code": "cha-002-004-002-001-003-003",
                          "title": "평행선 사이의 선분의 길이의 비의 응용"
                        },
                        {
                          "code": "cha-002-004-002-001-003-004",
                          "title": "삼각형의 두 변의 중점을 연결한 선분의 성질"
                        },
                        {
                          "code": "cha-002-004-002-001-003-005",
                          "title": "삼각형의 무게중심"
                        },
                        {
                          "code": "cha-002-004-002-001-003-006",
                          "title": "삼각형의 무게중심과 넓이"
                        },
                        {
                          "code": "cha-002-004-002-001-003-007",
                          "title": "닮은 도형의 넓이의 비와 부피의 비"
                        }
                      ]
                    }
                  ]
                },
                {
                  "code": "cha-002-004-002-002",
                  "title": "피타고라스 정리",
                  "smallUnits": [
                    {
                      "code": "cha-002-004-002-002-001",
                      "title": "피타고라스 정리",
                      "subjects": [
                        {
                          "code": "cha-002-004-002-002-001-001",
                          "title": "피타고라스 정리"
                        },
                        {
                          "code": "cha-002-004-002-002-001-002",
                          "title": "피타고라스 정리의 활용"
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        },
        {
          "code": "cha-002-005",
          "title": "확률과 통계",
          "bigUnits": [
            {
              "code": "cha-002-005-001",
              "title": "확률",
              "middleUnits": [
                {
                  "code": "cha-002-005-001-001",
                  "title": "확률과 그 기본 성질",
                  "smallUnits": [
                    {
                      "code": "cha-002-005-001-001-001",
                      "title": "경우의 수",
                      "subjects": [
                        {
                          "code": "cha-002-005-001-001-001-001",
                          "title": "사건과 경우의 수"
                        },
                        {
                          "code": "cha-002-005-001-001-001-002",
                          "title": "여러 가지 경우의 수"
                        }
                      ]
                    },
                    {
                      "code": "cha-002-005-001-001-002",
                      "title": "확률",
                      "subjects": [
                        {
                          "code": "cha-002-005-001-001-002-001",
                          "title": "확률의 정의"
                        },
                        {
                          "code": "cha-002-005-001-001-002-002",
                          "title": "확률의 합과 곱"
                        },
                        {
                          "code": "cha-002-005-001-001-002-003",
                          "title": "여러 가지 확률"
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "code": "cha-003",
      "level": "middle",
      "title": "중학교",
      "grade": 3,
      "sectors": [
        {
          "code": "cha-003-001",
          "title": "수와 연산",
          "bigUnits": [
            {
              "code": "cha-003-001-001",
              "title": "제곱근과 실수",
              "middleUnits": [
                {
                  "code": "cha-003-001-001-001",
                  "title": "제곱근과 실수",
                  "smallUnits": [
                    {
                      "code": "cha-003-001-001-001-001",
                      "title": "제곱근과 그 성질",
                      "subjects": [
                        {
                          "code": "cha-003-001-001-001-001-001",
                          "title": "제곱근의 정의"
                        },
                        {
                          "code": "cha-003-001-001-001-001-002",
                          "title": "제곱근의 대소 관계\u001e"
                        }
                      ]
                    },
                    {
                      "code": "cha-003-001-001-001-002",
                      "title": "무리수와 실수",
                      "subjects": [
                        {
                          "code": "cha-003-001-001-001-002-001",
                          "title": "무리수와 실수의 정의"
                        },
                        {
                          "code": "cha-003-001-001-001-002-002",
                          "title": "실수의 대소 관계"
                        },
                        {
                          "code": "cha-003-001-001-001-002-003",
                          "title": "제곱근표를 이용한 제곱근의 값"
                        }
                      ]
                    },
                    {
                      "code": "cha-003-001-001-001-003",
                      "title": "\b근호를 포함한 식의 계산",
                      "subjects": [
                        {
                          "code": "cha-003-001-001-001-003-001",
                          "title": "근호가 있는 식의 변형"
                        },
                        {
                          "code": "cha-003-001-001-001-003-002",
                          "title": "\b제곱근의 곱셈과 나눗셈"
                        },
                        {
                          "code": "cha-003-001-001-001-003-003",
                          "title": "\b제곱근의 덧셈과 뺄셈"
                        },
                        {
                          "code": "cha-003-001-001-001-003-004",
                          "title": "\b복잡한 실수의 대소 관계"
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        },
        {
          "code": "cha-003-002",
          "title": "문자와 식",
          "bigUnits": [
            {
              "code": "cha-003-002-001",
              "title": "문자와 식",
              "middleUnits": [
                {
                  "code": "cha-003-002-001-001",
                  "title": "다항식의 곱셈과 인수분해",
                  "smallUnits": [
                    {
                      "code": "cha-003-002-001-001-001",
                      "title": "다항식의 곱셈과 나눗셈(3)",
                      "subjects": [
                        {
                          "code": "cha-003-002-001-001-001-001",
                          "title": "곱셈 공식"
                        },
                        {
                          "code": "cha-003-002-001-001-001-002",
                          "title": "곱셈 공식을 이용한 분모의 유리화"
                        },
                        {
                          "code": "cha-003-002-001-001-001-003",
                          "title": "곱셈 공식의 변형"
                        }
                      ]
                    },
                    {
                      "code": "cha-003-002-001-001-002",
                      "title": "인수분해",
                      "subjects": [
                        {
                          "code": "cha-003-002-001-001-002-001",
                          "title": "인수분해"
                        },
                        {
                          "code": "cha-003-002-001-001-002-002",
                          "title": "인수분해 공식"
                        },
                        {
                          "code": "cha-003-002-001-001-002-003",
                          "title": "복잡한 식의 인수분해"
                        }
                      ]
                    }
                  ]
                },
                {
                  "code": "cha-003-002-001-002",
                  "title": "이차방정식",
                  "smallUnits": [
                    {
                      "code": "cha-003-002-001-002-001",
                      "title": "이차방정식과 그 해",
                      "subjects": [
                        {
                          "code": "cha-003-002-001-002-001-001",
                          "title": "이차방정식\u001e"
                        }
                      ]
                    },
                    {
                      "code": "cha-003-002-001-002-002",
                      "title": "이차방정식\b의 풀이",
                      "subjects": [
                        {
                          "code": "cha-003-002-001-002-002-001",
                          "title": "인수분해를 이용한 이차방정식의 풀이"
                        },
                        {
                          "code": "cha-003-002-001-002-002-002",
                          "title": "제곱근을 이용한 이차방정식의 풀이"
                        },
                        {
                          "code": "cha-003-002-001-002-002-003",
                          "title": "근의 공식을 이용한 이차방정식의 풀이"
                        },
                        {
                          "code": "cha-003-002-001-002-002-004",
                          "title": "\b이차방정식의 근의 개수"
                        },
                        {
                          "code": "cha-003-002-001-002-002-005",
                          "title": "\b여러 가지 이차방정식"
                        },
                        {
                          "code": "cha-003-002-001-002-002-006",
                          "title": "\b이차방정식의 활용"
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        },
        {
          "code": "cha-003-003",
          "title": "함수",
          "bigUnits": [
            {
              "code": "cha-003-003-001",
              "title": "이차함수",
              "middleUnits": [
                {
                  "code": "cha-003-003-001-001",
                  "title": "이차함수와 그래프",
                  "smallUnits": [
                    {
                      "code": "cha-003-003-001-001-001",
                      "title": "이차함수",
                      "subjects": [
                        {
                          "code": "cha-003-003-001-001-001-001",
                          "title": "이차함수 y=x^2의 그래프"
                        }
                      ]
                    },
                    {
                      "code": "cha-003-003-001-001-002",
                      "title": "이차함수 y=ax^2의 그래프",
                      "subjects": [
                        {
                          "code": "cha-003-003-001-001-002-001",
                          "title": "이차함수 y=ax^2의 그래프"
                        }
                      ]
                    }
                  ]
                },
                {
                  "code": "cha-003-003-001-002",
                  "title": "이차함수 y=ax^2+bx+c의 그래프",
                  "smallUnits": [
                    {
                      "code": "cha-003-003-001-002-001",
                      "title": "이차함수 y=a(x-p)^2+q의 그래프",
                      "subjects": [
                        {
                          "code": "cha-003-003-001-002-001-001",
                          "title": "이차함수 y=a(x-p)^2+q의 그래프"
                        }
                      ]
                    },
                    {
                      "code": "cha-003-003-001-002-002",
                      "title": "이차함수 y=ax^2+bx+c의 그래프",
                      "subjects": [
                        {
                          "code": "cha-003-003-001-002-002-001",
                          "title": "이차함수 y=ax^2+bx+c의 그래프"
                        },
                        {
                          "code": "cha-003-003-001-002-002-002",
                          "title": "이차함수 y=ax^2+bx+c의 그래프와 a, b, c의 부호"
                        },
                        {
                          "code": "cha-003-003-001-002-002-003",
                          "title": "이차함수의 식 구하기"
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        },
        {
          "code": "cha-003-004",
          "title": "기하",
          "bigUnits": [
            {
              "code": "cha-003-004-001",
              "title": "삼각비",
              "middleUnits": [
                {
                  "code": "cha-003-004-001-001",
                  "title": "삼각비",
                  "smallUnits": [
                    {
                      "code": "cha-003-004-001-001-001",
                      "title": "삼각비",
                      "subjects": [
                        {
                          "code": "cha-003-004-001-001-001-001",
                          "title": "삼각비의 정의"
                        },
                        {
                          "code": "cha-003-004-001-001-001-002",
                          "title": "특수각의 삼각비의 값"
                        },
                        {
                          "code": "cha-003-004-001-001-001-003",
                          "title": "예각의 삼각비의 값"
                        },
                        {
                          "code": "cha-003-004-001-001-001-004",
                          "title": "삼각비의 표"
                        }
                      ]
                    },
                    {
                      "code": "cha-003-004-001-001-002",
                      "title": "삼각비의 활용",
                      "subjects": [
                        {
                          "code": "cha-003-004-001-001-002-001",
                          "title": "삼각비와 변의 길이"
                        },
                        {
                          "code": "cha-003-004-001-001-002-002",
                          "title": "삼각형의 넓이"
                        },
                        {
                          "code": "cha-003-004-001-001-002-003",
                          "title": "사각형의 넓이"
                        }
                      ]
                    }
                  ]
                }
              ]
            },
            {
              "code": "cha-003-004-001",
              "title": "원",
              "middleUnits": [
                {
                  "code": "cha-003-004-001-001",
                  "title": "원과 직선",
                  "smallUnits": [
                    {
                      "code": "cha-003-004-001-001-001",
                      "title": "원의 현",
                      "subjects": [
                        {
                          "code": "cha-003-004-001-001-001-001",
                          "title": "현"
                        },
                        {
                          "code": "cha-003-004-001-001-001-002",
                          "title": "현의 성질\u001e"
                        }
                      ]
                    },
                    {
                      "code": "cha-003-004-001-001-002",
                      "title": "원의 접선",
                      "subjects": [
                        {
                          "code": "cha-003-004-001-001-002-001",
                          "title": "원의 접선의 성질"
                        },
                        {
                          "code": "cha-003-004-001-001-002-002",
                          "title": "\b삼각형의 내접원"
                        },
                        {
                          "code": "cha-003-004-001-001-002-003",
                          "title": "\b원에 외접하는 사각형의 성질\u001f"
                        }
                      ]
                    }
                  ]
                },
                {
                  "code": "cha-003-004-001-002",
                  "title": "원주각",
                  "smallUnits": [
                    {
                      "code": "cha-003-004-001-002-001",
                      "title": "원주각",
                      "subjects": [
                        {
                          "code": "cha-003-004-001-002-001-001",
                          "title": "원주각의 성질"
                        }
                      ]
                    },
                    {
                      "code": "cha-003-004-001-002-002",
                      "title": "원주각의 활용",
                      "subjects": [
                        {
                          "code": "cha-003-004-001-002-002-001",
                          "title": "원주각과 사각형"
                        },
                        {
                          "code": "cha-003-004-001-002-002-002",
                          "title": "\b접선과 현이 이루는 각"
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        },
        {
          "code": "cha-003-005",
          "title": "확률과 통계",
          "bigUnits": [
            {
              "code": "cha-003-005-001",
              "title": "통계(3)",
              "middleUnits": [
                {
                  "code": "cha-003-005-001-001",
                  "title": "대푯값과 산포도",
                  "smallUnits": [
                    {
                      "code": "cha-003-005-001-001-001",
                      "title": "대푯값",
                      "subjects": [
                        {
                          "code": "cha-003-005-001-001-001-001",
                          "title": "대푯값"
                        }
                      ]
                    },
                    {
                      "code": "cha-003-005-001-001-002",
                      "title": "\b산포도",
                      "subjects": [
                        {
                          "code": "cha-003-005-001-001-002-001",
                          "title": "분산과 표준편차"
                        }
                      ]
                    }
                  ]
                },
                {
                  "code": "cha-003-005-001-002",
                  "title": "상관관계",
                  "smallUnits": [
                    {
                      "code": "cha-003-005-001-002-001",
                      "title": "산점도와 상관관계",
                      "subjects": [
                        {
                          "code": "cha-003-005-001-002-001-001",
                          "title": "산점도와 상관관계"
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}
bramp commented 8 months ago

Thanks for the examples.

FlutterGen only considers a .json a Lottie file, if it passes this code https://github.com/FlutterGen/flutter_gen/blob/main/packages/core/lib/generators/integrations/lottie_integration.dart#L107-L132

Specifically they must contain all these fields:

'w', // width
'h', // height
'ip', // The frame at which the Lottie animation starts at
'op', // The frame at which the Lottie animation ends at
'fr', // frame rate
'v', // // Must include version
'layers', // Must include layers

and the 'v' field must have a valid version number greater than 4.4.

Neither of those json files satisfy those conditions, and are thus not lottie files.

flexboni commented 8 months ago

Thanks for the examples.

FlutterGen only considers a .json a Lottie file, if it passes this code https://github.com/FlutterGen/flutter_gen/blob/main/packages/core/lib/generators/integrations/lottie_integration.dart#L107-L132

Specifically they must contain all these fields:

'w', // width
'h', // height
'ip', // The frame at which the Lottie animation starts at
'op', // The frame at which the Lottie animation ends at
'fr', // frame rate
'v', // // Must include version
'layers', // Must include layers

and the 'v' field must have a valid version number greater than 4.4.

Neither of those json files satisfy those conditions, and are thus not lottie files.

Thank you very much!!