Skip to content

Commit

Permalink
Merge pull request #57 from ened/patch-1
Browse files Browse the repository at this point in the history
Ensure print statements only run for debug builds
  • Loading branch information
adar2378 authored May 27, 2020
2 parents ab506c3 + ac9743a commit 145a2d8
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions lib/pin_code_fields.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import 'dart:io' show Platform;
import 'dart:math';

import 'package:flutter/cupertino.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:pin_code_fields/models/dialog_config.dart';
Expand Down Expand Up @@ -161,8 +162,10 @@ class _PinCodeTextFieldState extends State<PinCodeTextField>

@override
void initState() {
print(
"IF YOU WANT TO USE COLOR FILL FOR EACH CELL THEN SET enableActiveFill = true");
if (!kReleaseMode) {
print(
"IF YOU WANT TO USE COLOR FILL FOR EACH CELL THEN SET enableActiveFill = true");
}

_checkForInvalidValues();
_assignController();
Expand Down Expand Up @@ -276,8 +279,10 @@ class _PinCodeTextFieldState extends State<PinCodeTextField>
if (widget.autoDisposeControllers) {
_textEditingController.dispose();
_focusNode.dispose();
print(
"*** Disposing _textEditingController and _focusNode, To disable this feature please set autoDisposeControllers = false***");
if (!kReleaseMode) {
print(
"*** Disposing _textEditingController and _focusNode, To disable this feature please set autoDisposeControllers = false***");
}
}
_controller.dispose();
super.dispose();
Expand Down

0 comments on commit 145a2d8

Please sign in to comment.