Fintasys / emoji_picker_flutter

A Flutter package that provides an Emoji picker widget with 1500+ emojis in 8 categories.
MIT License
164 stars 125 forks source link

Espaçamento superior interno #16

Closed carlinho11 closed 3 years ago

carlinho11 commented 3 years ago

Como faço para diminuir ou remover completamente esse espaçamento interno?

Tela

Fintasys commented 3 years ago

@carlinho11 There shouldn't be any space 🤔 Can you share part of your code?

carlinho11 commented 3 years ago

Bom dia @Fintasys,

Fiz uma simulação e ocorreu o mesmo problema:

main.dart:

import 'package:emoji_picker_flutter/emoji_picker_flutter.dart';
import 'package:flutter/material.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  MyHomePage({Key key, this.title}) : super(key: key);
  final String title;
  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: Color(0xFFf2f1f1),
      body: Column(
        children: [
          Expanded(
            child: SingleChildScrollView(),
          ),
          _campoFigurinhas(),
        ],
      ),
    );
  }

  Widget _campoFigurinhas() {
    return Offstage(
      offstage: false,
      child: Container(
        alignment: Alignment.topCenter,
        height: 250,
        child: EmojiPicker(
          onEmojiSelected: (Category category, Emoji emoji) {},
          onBackspacePressed: () {},
          config: const Config(
              columns: 8,
              emojiSizeMax: 25.0,
              verticalSpacing: 0,
              horizontalSpacing: 0,
              initCategory: Category.RECENT,
              bgColor: Colors.white,
              indicatorColor: Color(0xff7C4EFF),
              iconColor: Colors.grey,
              iconColorSelected: Color(0xff7C4EFF),
              progressIndicatorColor: Color(0xff7C4EFF),
              backspaceColor: Color(0xff7C4EFF),
              showRecentsTab: true,
              recentsLimit: 28,
              noRecentsText: 'Não há recentes',
              noRecentsStyle: TextStyle(fontSize: 20, color: Colors.black26),
              categoryIcons: CategoryIcons(),
              buttonMode: ButtonMode.MATERIAL),
        ),
      ),
    );
  }
}

pubspec.yaml:

name: teste_emoti
description: A new Flutter application.

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

version: 1.0.0+1

environment:
  sdk: ">=2.7.0 <3.0.0"

dependencies:
  shared_preferences: ^2.0.5
  emoji_picker_flutter: ^1.0.5

  flutter:
    sdk: flutter
  cupertino_icons: ^1.0.2

dev_dependencies:
  flutter_test:
    sdk: flutter

flutter:
  uses-material-design: true

Agradeço a atenção :)

Fintasys commented 3 years ago

I found the bug, but I don't know why. 🤔
If you add AppBar it works.

Scaffold(
      backgroundColor: Colors.white,
      appBar: AppBar(
        title: const Text('Emoji Picker Example App'),
      ),

I know how to fix it and will fix it in the next version. Thank you for reporting the bug ! 🙇

carlinho11 commented 3 years ago

Ótimo, estou ansioso pela próxima versão.

Agradeço a sua atenção! 😊

Fintasys commented 3 years ago

@carlinho11 Can you test? Pubspec.yaml:

  emoji_picker_flutter:
    git:
      url: https://github.com/Fintasys/emoji_picker_flutter.git
      ref: master
carlinho11 commented 3 years ago

@Fintasys Testei e está tudo correto, o bug foi resolvido!

Fintasys commented 3 years ago

Obrigado por testar! 😃