패키지, 저장소 및 앱 카테고리 검색

crossword 표지
패키지 상세v1.3.2

crossword

앱에서 크로스워드 퍼즐을 해결하기 위한 사용자 인터페이스를 제공하는 플러터 패키지입니다.

AndroidiOSWebmacOSWindowsLinux
30일 다운로드
295
좋아요
36
Pub 점수
150

패키지 설치

flutter pub add crossword

패키지 개요

공개 정보를 바탕으로 생성한 선택 가이드입니다.

크로스워드 패키지는 개발자가 애플리케이션에 상호작용 가능한 크로스워드 퍼즐 해결 기능을 통합할 수 있도록 해주는 플러터 라이브러리입니다. 사용자 정의 가능한 UI를 제공하여 크로스워드 그리드를 표시하고 상호작용할 수 있으며, 가로 및 세로 단서 모두를 지원합니다. 게임과 교육용 앱을 위해 설계되었으며, 사용자가 그리드에서 답을 실시간으로 입력하고 검증 및 피드백을 받을 수 있습니다. 이 패키지는 모바일, 웹, 데스크톱 등 모든 주요 플랫폼에서 호환되며, 크로스플랫폼 퍼즐 경험에 이상적입니다.

사용 사례

  • 교육용 앱에 크로스워드 퍼즐 통합하기
  • 게임 애플리케이션에 퍼즐 도전 과제 추가
  • 웹 및 모바일용 인터랙티브 단어 게임 만들기
  • 크로스워드 연습을 통한 언어 학습 지원
  • 사용자 생성 퍼즐 콘텐츠 활성화

주요 기능

  • 터치 입력을 지원하는 인터랙티브 크로스워드 그리드
  • 실시간 단서 탐색 및 강조
  • 사용자 정의 가능한 퍼즐 레이아웃 및 스타일링
  • 크로스 플랫폼 호환성 (Android, iOS, Web, macOS, Windows, Linux)
  • 내장된 답변 검증 및 피드백
  • 동적 퍼즐 로딩 지원

적합한 대상

  • 교육 앱 개발자
  • 퍼즐 메커니즘을 찾는 게임 개발자
  • 언어 학습 애플리케이션 제작자
  • 크로스 플랫폼 앱 빌더
  • 네이티브처럼 보이는 퍼즐 인터페이스를 원하는 Flutter 사용자

고려 사항

  • 구조화된 퍼즐 데이터(예: 그리드 및 단서)가 필요합니다
  • 클루 힌트 또는 스코어링을 위한 추가 로직이 필요할 수 있습니다
  • 매우 큰 퍼즐에서는 성능이 달라질 수 있습니다
  • 제한된 내장 퍼즐 생성 도구
  • 퍼즐 콘텐츠에 외부 데이터 소스에 의존합니다

원본 README

연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.

NEW: LetterPop Animation

Crossword pub package


GitHub commit activity GitHub contributors GitHub Repo stars GitHub Pub Version Pub Likes Pub Points Pub Popularity


Crossword is a comprehensive solution for seamlessly integrating a crossword puzzle-solving user interface into your Flutter app. With this package, you can effortlessly provide users with an interactive and enjoyable crossword puzzle-solving experience within your application.

Features

  • Customizable Crossword Widget: The package offers a customizable crossword widget that can be easily integrated into any Flutter app. You can adjust the widget's appearance, size, and layout to match your app's design and theme.

  • User-Friendly Interface: The user interface is designed with simplicity and ease of use in mind. Users can intuitively navigate through the puzzle, pan, and select the letters to choose words.

  • Clue Management: Manage crossword clues effortlessly with this package by passing the list of words into the Crossword widget.

Getting started

Installation

You just need to add crossword as a dependency in your pubspec.yaml file.

dependencies:
  crossword: ^1.3.2

Import the package in your Dart code and instantiate the Crossword widget.

Example

To get started add the Crossword widget.

  • letters : takes all the letters as a two-dimentional List
  • spacing : controls the horizontal and vertical spacing in between letters the Crossword panel
  • hints : takes a List of words as clues
Crossword(
   letters: const [
       ["F", "L", "U", "T", "T", "E", "R", "W", "U", "D", "B", "C"],
       ["R", "M", "I", "O", "P", "U", "I", "Q", "R", "L", "E", "G"],
       ["T", "V", "D", "I", "R", "I", "M", "U", "A", "H", "E", "A"],
       ["D", "A", "R", "T", "N", "S", "T", "O", "Y", "J", "R", "M"],
       ["O", "G", "A", "M", "E", "S", "C", "O", "L", "O", "R", "O"],
       ["S", "R", "T", "I", "I", "I", "F", "X", "S", "P", "E", "D"],
       ["Y", "S", "N", "E", "T", "M", "M", "C", "E", "A", "T", "S"],
       ["W", "E", "T", "P", "A", "T", "D", "Y", "L", "M", "N", "U"],
       ["O", "T", "E", "H", "R", "O", "G", "P", "T", "U", "O", "E"],
       ["K", "R", "R", "C", "G", "A", "M", "E", "S", "S", "T", "S"],
       ["S", "E", "S", "T", "L", "A", "O", "P", "U", "P", "E", "S"]
   ],
   spacing: const Offset(30, 30),
   onLineDrawn: (List<String> words) {},
   textStyle: const TextStyle(
   color: Colors.black, fontSize: 16, fontWeight: FontWeight.bold),
   lineDecoration: const LineDecoration(
      lineGradientColors: [
         [Colors.blue, Colors.black, Colors.red],
         [Colors.orange, Colors.black],
      ],
      strokeWidth: 26,
      lineTextStyle: TextStyle(
        color: Colors.white, fontSize: 16, 
        fontWeight: FontWeight.bold),
      ),
    hints: const ["FLUTTER", "GAMES", "UI", "COLORS"],
)

Additional parameters

  • initialLineList: Accepts a List of LineOffset to add initial lines to the crossword -- A LineOffset is a class that takes the start and end positions of the line
  • acceptReversedDirection: accepts a bool to identify while creating the words by touching in the reversed direction, is enabled or not
  • drawCrossLine: accepts a bool, and identifies if the user can interact in the Cross direction or not.
  • drawVerticalLine: accepts a bool, and identifies if the user can interact in the Vertical direction or not.
  • drawHorizontalLine: accepts a bool, and identifies if the user can interact in the Horizontal direction or not.

drawCrossLine, drawVerticalLine, drawHorizontalLine can't be set as false altogether.

  • lineDecoration: Decorate lines to update colors based on the input and clues
  • textStyle: Add styles to the crossword letters
  • transposeMatrix: Transpose the 2x2 matrix
  • alowOverlap: Accepts a bool to identify if the user can overlap the words or not
  • addIncorrectWord: Accepts a bool to identify if the user can draw incorrect lines or not

Line Decoration - parameters

  • lineGradientColors: Accepts a List of List of Colors to update the gradient colors of the lines.
  • incorrectGradientColors: Accepts a List of Colors to update the gradient colors of the lines when the user draws an incorrect line.
  • correctGradientColors: Accepts a List of Colors to update the gradient colors of the lines when the user draws a correct line.
  • strokeWidth: Accepts a double to update the width of the lines.
  • strokeCap: Accepts a StrokeCap to update the stroke cap of the lines.
  • lineTextStyle: Accepts a TextStyle to update the style of the words which are drawn by the user.

Reveal Letter Animation

  • Use a Global Key to access the Crossword widget and call the animate method to animate the letter decoration.
final GlobalKey<CrosswordState> _crosswordState = GlobalKey();
  • Pass the GlobalKey to the Crossword widget
 Crossword(key: _crosswordState);
  • Access the Crossword widget using the global key and call the animate method to animate the letter
//offset is the position of the letter in the crossword
 crosswordState.currentState!.animate(offset: const Offset(7, 3));
  • revealLetterDecoration: Accepts a RevealLetterDecoration to animate the decoration of the letters

  • 'letterPopDecoration': Accepts a LetterPopDecoration to animate the decoration of the specific letter onTouchEvent

Contributions

Contributions are welcome! If you find a bug or want to add a feature, please file an issue

카테고리

소스 저장소

이 패키지를 사용하는 프로젝트

아직 데이터가 없습니다.